2014-09-22 15:50:38 +02:00
|
|
|
# Class swift::storage::object
|
|
|
|
#
|
|
|
|
# == Parameters
|
|
|
|
# [*enabled*]
|
|
|
|
# (optional) Should the service be enabled.
|
|
|
|
# Defaults to true
|
|
|
|
#
|
|
|
|
# [*manage_service*]
|
|
|
|
# (optional) Whether the service should be managed by Puppet.
|
|
|
|
# Defaults to true.
|
|
|
|
#
|
|
|
|
# [*package_ensure*]
|
|
|
|
# (optional) Value of package resource parameter 'ensure'.
|
|
|
|
# Defaults to 'present'.
|
|
|
|
#
|
2012-03-02 20:01:49 -08:00
|
|
|
class swift::storage::object(
|
2014-09-22 15:50:38 +02:00
|
|
|
$manage_service = true,
|
|
|
|
$enabled = true,
|
2012-03-02 20:01:49 -08:00
|
|
|
$package_ensure = 'present'
|
|
|
|
) {
|
2015-04-09 15:23:01 -04:00
|
|
|
|
|
|
|
Swift_config<| |> ~> Service['swift-object-updater']
|
|
|
|
Swift_config<| |> ~> Service['swift-object-auditor']
|
|
|
|
|
2012-03-02 20:01:49 -08:00
|
|
|
swift::storage::generic { 'object':
|
2014-09-22 15:50:38 +02:00
|
|
|
manage_service => $manage_service,
|
|
|
|
enabled => $enabled,
|
2015-03-23 18:25:34 +01:00
|
|
|
package_ensure => $package_ensure,
|
2012-03-02 20:01:49 -08:00
|
|
|
}
|
2012-09-20 11:10:18 +02:00
|
|
|
|
2015-03-23 18:25:34 +01:00
|
|
|
include ::swift::params
|
2014-03-05 08:55:57 -08:00
|
|
|
|
2014-09-22 15:50:38 +02:00
|
|
|
if $manage_service {
|
|
|
|
if $enabled {
|
|
|
|
$service_ensure = 'running'
|
|
|
|
} else {
|
|
|
|
$service_ensure = 'stopped'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-24 06:16:59 -04:00
|
|
|
service { 'swift-object-updater':
|
2015-03-23 18:11:23 +01:00
|
|
|
ensure => $service_ensure,
|
|
|
|
name => $::swift::params::object_updater_service_name,
|
|
|
|
enable => $enabled,
|
|
|
|
provider => $::swift::params::service_provider,
|
|
|
|
require => Package['swift-object'],
|
2013-04-24 06:16:59 -04:00
|
|
|
}
|
2014-03-05 08:55:57 -08:00
|
|
|
|
2013-04-24 06:16:59 -04:00
|
|
|
service { 'swift-object-auditor':
|
2015-03-23 18:11:23 +01:00
|
|
|
ensure => $service_ensure,
|
|
|
|
name => $::swift::params::object_auditor_service_name,
|
|
|
|
enable => $enabled,
|
|
|
|
provider => $::swift::params::service_provider,
|
|
|
|
require => Package['swift-object'],
|
2012-09-20 11:10:18 +02:00
|
|
|
}
|
2012-03-02 20:01:49 -08:00
|
|
|
}
|