James Trier
2013-Oct-19 00:04 UTC
[Puppet Users] Puppet Console Groups - Node pattern match
Hi, I want to use the Groups feature in the console to setup a pattern match on "hostname" for a node so that they get all the classes assigned to that group. I''m currently doing this through the nodes/nodes.pp file for a set of simple named hosts (example of my regex in the nodes.pp below) but now I need to expand this a bit and I''m not a regex guy and I can''t the regex right so I was hoping there was an easier way to match node name strings in the console. node /^hostname\d+$/ { include <module> } Basically, I''m looking for something like, match anything that starts with web and ends with two digits. Thanks James -- 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. For more options, visit https://groups.google.com/groups/opt_out.
James Trier
2013-Oct-19 05:32 UTC
[Puppet Users] Re: Puppet Console Groups - Node pattern match
Solved my issue by getting the regex right but I''d still like know other options for automating the collection of nodes into a group via the console. If anyone has some pointers. On Friday, October 18, 2013 5:04:13 PM UTC-7, James Trier wrote:> > Hi, > > I want to use the Groups feature in the console to setup a pattern match > on "hostname" for a node so that they get all the classes assigned to that > group. I''m currently doing this through the nodes/nodes.pp file for a set > of simple named hosts (example of my regex in the nodes.pp below) but now I > need to expand this a bit and I''m not a regex guy and I can''t the regex > right so I was hoping there was an easier way to match node name strings in > the console. > > node /^hostname\d+$/ { > include <module> > } > > Basically, I''m looking for something like, match anything that starts with web and ends with two digits. > > Thanks > > James > >-- 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. For more options, visit https://groups.google.com/groups/opt_out.