Puppet Class: gerrit::service
- Defined in:
- manifests/service.pp
Overview
Class: gerrit::service
This class manages the Gerrit service itself
Parameters
This class accepts no parameters directly
Variables
The following variables are all required
- service_enabled
-
Determines if the mode the service is configured for:
true: (default) service is ensured started and enabled for reboot false: service is ensured stopped and disabled for reboot manual: service is configured as a manual service, refreshes / notifications will behave per normal when a service is configured with enable => manual. The service is not specifically started or stopped
Authors
Andrew Grimberg <agrimberg@linuxfoundation.org>
Copyright
Copyright 2014 Andrew Grimberg
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'manifests/service.pp', line 30
class gerrit::service (
$service_enabled
) {
unless is_bool($service_enabled) {
validate_re($service_enabled, '^manual$',
"${service_enabled} is not supported for service_enabled. \
Allowed values are true, false, 'manual'.")
}
if (is_bool($service_enabled)) {
# $service_enabled maps directly to ensure
$ensure = $service_enabled
}
else {
# $service_enabled maps only to enable, set ensure to undef
$ensure = undef
}
$enable = $service_enabled
service { 'gerrit':
ensure => $ensure,
enable => $enable,
hasrestart => true,
hasstatus => true,
}
}
|