Does anyone have an example of passing variables from state files to be rendered in a temple file. I'm trying to do it a bit like puppet does so puppet wise it looks something like.
class monit ($os_install='UNSET'){
....
file { "/etc/monitrc":
mode => "700",
content => template("monit/monitrc.erb");
}
}
and the template would render the mmonit_host var something like:
set daemon 30 # check services at 30 second intervals
set logfile /var/log/monit.log
set alert <%= $admin => but not on {
checksum } with reminder on 10 cycles
set mailserver localhost
set eventqueue basedir /var/monit/ slots 1000
set httpd port 2812 and
use address 127.0.0.1 # only accept connection from eth1
allow localhost # allow localhost to connect to the server and
allow admin:monit # require user 'admin' with password 'monit'