Dear all, According to the Puppet doc, I used this: node /^farm0\d+$/ inherits workernode { } in the node.pp to match any host like farm001.example.com but I get error on the client nodes: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find node ''farm029.example.com'' on node farm029.example.com warning: Not using cache on failed catalog Any idea what''s I''m doing wrong? FYI, if I remove the "example.com" part and use only "/^farm0\d+/" it works. Much appreciated your help. Cheers!!! -- 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.
On Fri, Apr 29, 2011 at 04:20:58AM -0700, Sans wrote:> node /^farm0\d+$/ inherits workernode { > > err: Could not retrieve catalog from remote server: Error 400 on > SERVER: Could not find node ''farm029.example.com'' on node > farm029.example.comThat regex is saying, match farm0 at the start of a string and then only match digits until the end of the string. So it matches to farm029 and then stops in failure as its found characters. If all your hosts are in the same domain just removing the $ (end of string matcher) should work. /^farm0\d+/ Otherwise /^farm0\d+.example.com$/ will also work, and be more precise. Dean -- Dean Wilson http://www.unixdaemon.net @unixdaemon http://www.puppetcookbook.com @puppetcookbook -- 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 Dean, I got it now. It was really silly that I was thinking "$" is a special notation used by Puppet for domain name. All working now. Cheers!! On Apr 29, 12:58 pm, Dean Wilson <dwil...@unixdaemon.net> wrote:> > That regex is saying, match farm0 at the start of a string and then only > match digits until the end of the string. > > So it matches to farm029 and then stops in failure as its found > characters. If all your hosts are in the same domain just removing the $ > (end of string matcher) should work. > > /^farm0\d+/ > > Otherwise /^farm0\d+.example.com$/ will also work, and be more precise. > > Dean > -- > Dean Wilsonhttp://www.unixdaemon.net @unixdaemonhttp://www.puppetcookbook.com @puppetcookbook-- 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.