On Nov 16, 2011, at 11:08 AM, Ramin K wrote: > You can also use regex in your node files to further simplify though > if you're doing a lot of logic here you should probably start thinking > about an ENC. > > fe.pp > node /^fe\d+(.*)/ inherits basenode { > > case $::fqdn { > /(.*)stage|demo(.*)/: { > include hostgroup::frontend::stage > } > default: { > include hostgroup::frontend::prod > } > } > }
Ramin, curious as to how this differs from the shorter …? node /^fe\d+(.*)(stage|demo)(.*)/ inherits basenode { include hostgroup::frontend::stage } node /^fe\d+(.*)/ inherits basenode { include hostgroup::frontend::prod } I love regexs too, but that seems to be excessive syntax. (and FYI, you forgot parens around the | …) -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.