puppet-zaqar/manifests/server.pp
Dan Prince ecadc5930d Add zaqar::server class
This class manages the primary zaqar-server process.

Change-Id: Ie062d1ff4dd2a3adef5bcc9d36eca2f67a39048c
2016-02-16 15:33:51 -05:00

38 lines
734 B
Puppet

# = Class: zaqar::server
#
# This class manages the Zaqar server.
#
# [*enabled*]
# (Optional) Service enable state for zaqar-server.
# Defaults to true.
#
# [*manage_service*]
# (Optional) Whether the service is managed by this puppet class.
# Defaults to true.
#
class zaqar::server(
$manage_service = true,
$enabled = true,
) {
include ::zaqar
include ::zaqar::params
if $manage_service {
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
}
if $manage_service {
service { $::zaqar::params::service_name:
ensure => $service_ensure,
enable => $enabled,
}
Zaqar_config<||> ~> Service[$::zaqar::params::service_name]
}
}