puppet-swift/manifests/storage/container.pp
Radim Kubacki 3a0413f7f5 Customizable allowed_sync_hosts in container-server.conf
Insert default value into .conf file (127.0.0.1) or use
custom value if specified.

Change-Id: I9caec9657a2a3ad789b7dab646e505f609c25655
2013-05-29 12:39:21 +02:00

48 lines
1.5 KiB
Puppet

#
# === Parameters
#
# [*allowed_sync_hosts*] A list of hosts allowed in the X-Container-Sync-To
# field for containers. Defaults to one entry list '127.0.0.1'.
#
class swift::storage::container(
$package_ensure = 'present',
$allowed_sync_hosts = ['127.0.0.1'],
) {
swift::storage::generic { 'container':
package_ensure => $package_ensure
}
service { 'swift-container-updater':
name => $::swift::params::container_updater_service_name,
ensure => running,
enable => true,
provider => $::swift::params::service_provider,
require => Package['swift-container'],
}
service { 'swift-container-auditor':
name => $::swift::params::container_auditor_service_name,
ensure => running,
enable => true,
provider => $::swift::params::service_provider,
require => Package['swift-container'],
}
if $operatingsystem == 'Ubuntu' {
# The following service conf is missing in Ubunty 12.04
file { '/etc/init/swift-container-sync.conf':
source => 'puppet:///modules/swift/swift-container-sync.conf.upstart',
require => Package['swift-container'],
}
file { '/etc/init.d/swift-container-sync':
ensure => link,
target => '/lib/init/upstart-job',
}
service { 'swift-container-sync':
ensure => running,
enable => true,
provider => $::swift::params::service_provider,
require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync']
}
}
}