Skip to content

Instantly share code, notes, and snippets.

@btisdall
Last active December 22, 2015 15:39
Show Gist options
  • Save btisdall/6493894 to your computer and use it in GitHub Desktop.
Save btisdall/6493894 to your computer and use it in GitHub Desktop.
class dba_nagios(
$active_server_fqdn = undef,
){
if ($active_server_fqdn == $fqdn) {
$service_enable = true
$service_ensure = running
}
else {
$service_enable = false
$service_ensure = stopped
}
# ...
service { 'nagios':
ensure => $service_ensure,
enabled => $service_enable,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment