Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class monit {
$packagelist = [ $operatingsystem ? {
FreeBSD => "sysutils/monit",
default => "monit",
},
]
package { $packagelist:
ensure => present,
}
service { monit:
name => $operatingsystem ? {
default => "monit",
},
enable => true,
ensure => running,
require => File["monit"],
}
file { monit:
path => $operatingsystem ? {
FreeBSD => "/usr/local/etc/monitrc",
debian => "/etc/monit/monitrc",
ubuntu => "/etc/monit/monitrc",
default => "/etc/monit.conf"
},
source => "puppet://$puppetserver/files/default/etc/monit-$hostname.conf",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.