fuel-library/deployment/puppet/rabbitmq/manifests/service.pp
Bogdan Dobrelya 57d51bbae2 Sync puppetlabs rabbitmq module
commit 4832bd61b5b1bfea7c9cc985508e65cd10081652
Source: https://github.com/puppetlabs/puppetlabs-rabbitmq.git

Related blueprint merge-openstack-puppet-modules

Fuel-CI: disable
Change-Id: I924a2a4489dc329fefbee859a4b4bde0b79e86d1
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2015-01-09 16:11:20 +01:00

41 lines
825 B
Puppet

# Class: rabbitmq::service
#
# This class manages the rabbitmq server service itself.
#
# Parameters:
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
class rabbitmq::service(
$service_ensure = $rabbitmq::service_ensure,
$service_manage = $rabbitmq::service_manage,
$service_name = $rabbitmq::service_name,
) inherits rabbitmq {
validate_re($service_ensure, '^(running|stopped)$')
validate_bool($service_manage)
if ($service_manage) {
if $service_ensure == 'running' {
$ensure_real = 'running'
$enable_real = true
} else {
$ensure_real = 'stopped'
$enable_real = false
}
service { 'rabbitmq-server':
ensure => $ensure_real,
enable => $enable_real,
hasstatus => true,
hasrestart => true,
name => $service_name,
}
}
}