Nick Fagerlund
unread,Aug 1, 2012, 3:58:36 PM8/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppe...@googlegroups.com
You can't do this with a normal resource type -- $title will always be the title of the surrounding container.
So the solution is to interpose another container. Make a defined type that just acts as a macro here.
# /etc/puppetlabs/puppet/modules/monit/manifests/rcfile.pp
define monit::rcfile {
file { $title:
path => "/opt/monit/etc/conf.d/$title.rc",
ensure => file,
content => template("monit/$title.rc.erb"),
before => Service['monit'],
}
}
# /etc/puppetlabs/puppet/modules/monit/manifests/monit.pp
...
...
monit::rcfile { $server_types: }
See?