
* Fix following warnings: * double quoted string containing no variables * indentation of => is not properly aligned * mode should be represented as a 4 digit octal value or symbolic mode * string containing only a variable * top-scope variable being used without an explicit namespace * unquoted file mode * variable not enclosed in {} * Fix following errors: * trailing whitespace found * two-space soft tabs not used * Remove quotes around class in include/require statements Change-Id: Ia920d848e1955612a6486ec8731309e6d3a70f63
48 lines
1.5 KiB
Puppet
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']
|
|
}
|
|
}
|
|
}
|