Files
puppet-swift/manifests/ringserver.pp
Joel Capitao 053a3a2a56 Add 'rsync_use_xinetd' as argument to swift::ringserver
Since in RHEL/CentOS >= 8 rsyncd systemd unit is shipped in a
different package (rsync-dameon), we need to be able to not
use xinetd to manage rsync service.
The dependency on rsync-daemon for RHEL/CentOS >= 8
is handled in puppet-rsync with [1].

[1] https://github.com/puppetlabs/puppetlabs-rsync/pull/139/files

Closes-Bug: #1930855
Change-Id: I85abf3811d61fa8bfc0a1607818d6495549b5a6b
2021-10-01 16:16:19 +09:00

62 lines
1.4 KiB
Puppet

# == Class: swift::ringserver
#
# Used to create an rsync server to serve up the ring databases via rsync
#
# === Parameters
#
# [*local_net_ip*]
# (required) ip address that the swift servers should bind to.
#
# [*max_connections*]
# (optional) maximum connections to rsync server
# Defaults to 5
#
# [*rsync_use_xinetd*]
# (optional) Override whether to use xinetd to manage rsync service
# Defaults to swift::params::xinetd_available
#
# == Dependencies
#
# Class['swift']
#
# == Examples
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
class swift::ringserver(
$local_net_ip,
$max_connections = 5,
$rsync_use_xinetd = $::swift::params::xinetd_available,
) inherits swift::params {
include swift::deps
Class['swift::ringbuilder'] -> Class['swift::ringserver']
if $rsync_use_xinetd and ! $::swift::params::xinetd_available {
fail('xinetd is not available in this distro')
}
if !defined(Class['rsync::server']) {
class { 'rsync::server':
use_xinetd => $rsync_use_xinetd,
address => $local_net_ip,
use_chroot => 'no',
}
}
rsync::server::module { 'swift_server':
path => '/etc/swift',
lock_file => '/var/lock/swift_server.lock',
uid => 'swift',
gid => 'swift',
max_connections => $max_connections,
read_only => true,
}
}