Hi > Is it possible to test if a particular resource has already been > defined? I'd like to do something like this: > > if !Host["$fqdn"] { > host {"$fqdn": ip => "$ipaddress_eth0" } > } > > Essentially, test to see if there is no Host resource defined for the > current server and if not, add a host entry for itself using the IP > address of eth0.
http://reductivelabs.com/trac/puppet/wiki/FunctionReference#defined cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---