Referencing groups/classes from Puppet dashboard in my site manifest
- by Banjer
I'm using Puppet Dashboard as my ENC and I'm not sure how to reference or use class and group classifications from /etc/puppet/manifests/site.pp.
I have two groups defined in the dashboard: CentOS6 and SLES11. What should my site.pp look like if I want to include a certain list of modules in the CentOS6 group and a certain list of modules in the SLES11 group?
I'm trying to do something like this:
# /etc/puppet/manifests/site.pp
node basenode {
include hosts
include ssh::server
include ssh::client
include authentication
include sudo
include syslog
include mail
}
node 'CentOS6' inherits basenode {
include profile
}
node 'SLES11' inherits basenode {
include usrmounts
}
I have OS-specific case statements within my modules, but there are some modules that will only be applied to a certain distro. So I suppose I have two questions:
Is this the best way to apply modules/resources in an OS-specific manner? Or does the above make you want to vomit?
Regardless of #1, I'm still curious as how to reference classes, groups, and nodes from Dashboard within my manifests. I've read the External Nodes doc, but I'm not seeing how they correspond to manifests.
Thanks all.