Hi, Sorry if this question has been answered before (Could not find the answer, Google didn''t help either :) ). While specifying hosts I have used a regexp like this. " * /^hst[0-9]+.domainname/* " I have about 300+ hosts matching this regexp and is working pretty well, so far. However, I have 2 hosts in this list which have to be excluded. But, I don''t know how to do that. Can anyone please provide some pointers/ tips to fix this? Thanks in advance. -- LOhit -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
If you don''t want to edit your regexp, a simple solution could be adding something like this to the beginning of your manifests : if $hostname == "host-that-should-be-excluded" {} else { your actual manifest } At least that worked for me as I just tested it. christian On 29 Mrz., 10:35, LOhit <lohi...@gmail.com> wrote:> Hi, > > Sorry if this question has been answered before (Could not find the answer, > Google didn''t help either :) ). > > While specifying hosts I have used a regexp like this. " * > /^hst[0-9]+.domainname/* " I have about 300+ hosts matching this regexp and > is working pretty well, so far. However, I have 2 hosts in this list which > have to be excluded. But, I don''t know how to do that. > > Can anyone please provide some pointers/ tips to fix this? > > Thanks in advance. > > -- > LOhit-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks, in fact, I was going to use that if nothing else worked. It would be nice to have a exclude list though. Best Regards, -LOhit On Mon, Mar 29, 2010 at 5:59 PM, christian <christian@cust.in> wrote:> If you don''t want to edit your regexp, a simple solution could be > adding something like this to the beginning of your manifests : > > if $hostname == "host-that-should-be-excluded" {} > else { your actual manifest } > > At least that worked for me as I just tested it. > > christian > > > On 29 Mrz., 10:35, LOhit <lohi...@gmail.com> wrote: > > Hi, > > > > Sorry if this question has been answered before (Could not find the > answer, > > Google didn''t help either :) ). > > > > While specifying hosts I have used a regexp like this. " * > > /^hst[0-9]+.domainname/* " I have about 300+ hosts matching this regexp > and > > is working pretty well, so far. However, I have 2 hosts in this list > which > > have to be excluded. But, I don''t know how to do that. > > > > Can anyone please provide some pointers/ tips to fix this? > > > > Thanks in advance. > > > > -- > > LOhit > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- LOhit -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, On Mon, 2010-03-29 at 14:05 +0530, LOhit wrote:> Hi, > > > Sorry if this question has been answered before (Could not find the > answer, Google didn''t help either :) ). > > > While specifying hosts I have used a regexp like this. > " /^hst[0-9]+.domainname/ " I have about 300+ hosts matching this > regexp and is working pretty well, so far. However, I have 2 hosts in > this list which have to be excluded. But, I don''t know how to do > that. > > > Can anyone please provide some pointers/ tips to fix this? >Normal node syntax (ie by hostname/fqdn instead of regex) takes precedence over the regex nodes. Depending on what you mean by excluding (I assumed you meant that those host should have their own manifests) you can do: node "host321.domainname", "host644.domainname" { .. specific config } node /^hst[0-9]+.domainname/ { ... regular config... } -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi Brice, That is the first thing I tried, but unfortunately that isn''t working. I tried something like this, node "hst26.domainname inherits commonnode{ *specific to this host* } node " /^hst[0-9]+\.domainname/" inherits commonnode{ *everthing else* } I was also under the impression that the exclusive node definition takes precedence over regex matches, but guess I was wrong. -LOhit On Mon, Mar 29, 2010 at 7:23 PM, Brice Figureau < brice-puppet@daysofwonder.com> wrote:> Hi, > > On Mon, 2010-03-29 at 14:05 +0530, LOhit wrote: > > Hi, > > > > > > Sorry if this question has been answered before (Could not find the > > answer, Google didn''t help either :) ). > > > > > > While specifying hosts I have used a regexp like this. > > " /^hst[0-9]+.domainname/ " I have about 300+ hosts matching this > > regexp and is working pretty well, so far. However, I have 2 hosts in > > this list which have to be excluded. But, I don''t know how to do > > that. > > > > > > Can anyone please provide some pointers/ tips to fix this? > > > > Normal node syntax (ie by hostname/fqdn instead of regex) takes > precedence over the regex nodes. > > Depending on what you mean by excluding (I assumed you meant that those > host should have their own manifests) you can do: > > node "host321.domainname", "host644.domainname" { > .. specific config > } > > node /^hst[0-9]+.domainname/ { > ... regular config... > } > > -- > Brice Figureau > Follow the latest Puppet Community evolutions on www.planetpuppet.org! > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- LOhit -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.