Referencing groups/classes from Puppet dashboard in my site manifest

Posted by Banjer on Server Fault See other posts from Server Fault or by Banjer
Published on 2012-06-08T15:11:32Z Indexed on 2012/06/08 16:42 UTC
Read the original article Hit count: 380

Filed under:
|

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:

  1. Is this the best way to apply modules/resources in an OS-specific manner? Or does the above make you want to vomit?
  2. 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.

© Server Fault or respective owner

Related posts about puppet

Related posts about puppet-dashboard