
This adds defined anchor points for external modules to hook into the software install, config and service dependency chain. This allows external modules to manage software installation (virtualenv, containers, etc) and service management (pacemaker) without needing rely on resources that may change or be renamed. Change-Id: If4f585264f5f5a15549855d97b532866d91f5215
39 lines
726 B
Puppet
39 lines
726 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::deps
|
|
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,
|
|
tag => 'zaqar-service'
|
|
}
|
|
}
|
|
|
|
}
|