On Thu, Jun 18, 2009 at 12:14:59PM +1000, Avi Miller wrote:
>
> Hi gang,
>
> 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.
>
> Possible?
It sounds like you might be trying to define a host in more than one place.
I'm just a journeryman myself, but I think according to The Puppet Way (TM)
that's a Bad Thing (TM).
If you make sure that the host is only potentially defined in one place, you
don't have to worry about this.
Cheers,
--
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: [email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---