Hello All, I''ve been looking for a simple way to clean up my nodes.pp file and I was hoping to get some suggestions from you folks. At the moment, I keep all my class definitions within nodes.pp. It currently looks something like this: ### regex based workstation nodes #### node /^sbx-[^\s]*$/ { include gen-lucid-stages class { sbx-lucid-base-security : stage => security } class { sbx-lucid-workstation-base : stage => packages } class { sbx-lucid-base-upgrade : stage => upgrade } class { sbx-lucid-base-dist-upgrade : stage => dist-upgrade } class { sbx-lucid-base-filesystem : stage => filesystem } class { sbx-lucid-base-graphics : stage => graphics } class { sbx-lucid-weta-config : stage => configs } } ### Lucid Groupings #### class sbx-lucid-base-security { include sbx-lucid-common-puppet include sbx-lucid-common-auth include sbx-lucid-common-powerbroker } class sbx-lucid-workstation-base { include sbx-lucid-workstation-default } class sbx-lucid-base-upgrade { include sbx-lucid-common-upgrade } class sbx-lucid-base-dist-upgrade { include sbx-lucid-common-dist-upgrade } class sbx-lucid-base-filesystem { include sbx-lucid-common-autofs include sbx-lucid-common-softlinks } class sbx-lucid-base-graphics { include sbx-lucid-common-kubuntu-desktop include sbx-lucid-common-weta-kde include sbx-lucid-common-nvidia-driver-29553 } This however seems a bit cluttered and I was hoping to move these classes out of nodes.pp and into somewhere a bit more tidy. It''s probably my rudimentary understanding of puppet but are there any suggestions into how I might achieve this? Thanks in advance for the help on this one. Cheers, Mike -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
You want roles and profiles: http://www.craigdunn.org/2012/05/239/ On Monday, March 11, 2013 6:02:15 PM UTC-6, Mike Reed wrote:> > Hello All, > > I''ve been looking for a simple way to clean up my nodes.pp file and I was > hoping to get some suggestions from you folks. At the moment, I keep all > my class definitions within nodes.pp. It currently looks something like > this: > > ### regex based workstation nodes #### > node /^sbx-[^\s]*$/ { > include gen-lucid-stages > class { sbx-lucid-base-security : stage => security } > class { sbx-lucid-workstation-base : stage => packages } > class { sbx-lucid-base-upgrade : stage => upgrade } > class { sbx-lucid-base-dist-upgrade : stage => dist-upgrade } > class { sbx-lucid-base-filesystem : stage => filesystem } > class { sbx-lucid-base-graphics : stage => graphics } > class { sbx-lucid-weta-config : stage => configs } > } > > ### Lucid Groupings #### > class sbx-lucid-base-security { > include sbx-lucid-common-puppet > include sbx-lucid-common-auth > include sbx-lucid-common-powerbroker > } > class sbx-lucid-workstation-base { > include sbx-lucid-workstation-default > } > class sbx-lucid-base-upgrade { > include sbx-lucid-common-upgrade > } > class sbx-lucid-base-dist-upgrade { > include sbx-lucid-common-dist-upgrade > } > class sbx-lucid-base-filesystem { > include sbx-lucid-common-autofs > include sbx-lucid-common-softlinks > } > class sbx-lucid-base-graphics { > include sbx-lucid-common-kubuntu-desktop > include sbx-lucid-common-weta-kde > include sbx-lucid-common-nvidia-driver-29553 > } > > This however seems a bit cluttered and I was hoping to move these classes > out of nodes.pp and into somewhere a bit more tidy. It''s probably my > rudimentary understanding of puppet but are there any suggestions into how > I might achieve this? > > Thanks in advance for the help on this one. > > Cheers, > > Mike >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Thanks very much Joe. I''ll take a look and go from there. Much appreciated. Cheers, Mike On Monday, March 11, 2013 5:21:01 PM UTC-7, joe wrote:> > You want roles and profiles: > http://www.craigdunn.org/2012/05/239/ > > On Monday, March 11, 2013 6:02:15 PM UTC-6, Mike Reed wrote: >> >> Hello All, >> >> I''ve been looking for a simple way to clean up my nodes.pp file and I was >> hoping to get some suggestions from you folks. At the moment, I keep all >> my class definitions within nodes.pp. It currently looks something like >> this: >> >> ### regex based workstation nodes #### >> node /^sbx-[^\s]*$/ { >> include gen-lucid-stages >> class { sbx-lucid-base-security : stage => security } >> class { sbx-lucid-workstation-base : stage => packages } >> class { sbx-lucid-base-upgrade : stage => upgrade } >> class { sbx-lucid-base-dist-upgrade : stage => dist-upgrade >> } >> class { sbx-lucid-base-filesystem : stage => filesystem } >> class { sbx-lucid-base-graphics : stage => graphics } >> class { sbx-lucid-weta-config : stage => configs } >> } >> >> ### Lucid Groupings #### >> class sbx-lucid-base-security { >> include sbx-lucid-common-puppet >> include sbx-lucid-common-auth >> include sbx-lucid-common-powerbroker >> } >> class sbx-lucid-workstation-base { >> include sbx-lucid-workstation-default >> } >> class sbx-lucid-base-upgrade { >> include sbx-lucid-common-upgrade >> } >> class sbx-lucid-base-dist-upgrade { >> include sbx-lucid-common-dist-upgrade >> } >> class sbx-lucid-base-filesystem { >> include sbx-lucid-common-autofs >> include sbx-lucid-common-softlinks >> } >> class sbx-lucid-base-graphics { >> include sbx-lucid-common-kubuntu-desktop >> include sbx-lucid-common-weta-kde >> include sbx-lucid-common-nvidia-driver-29553 >> } >> >> This however seems a bit cluttered and I was hoping to move these classes >> out of nodes.pp and into somewhere a bit more tidy. It''s probably my >> rudimentary understanding of puppet but are there any suggestions into how >> I might achieve this? >> >> Thanks in advance for the help on this one. >> >> Cheers, >> >> Mike >> >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.