On Thu, 06 May 2010 08:54:51 +0200, donavan <dona...@desinc.net> wrote:
> But for more sophisticated puppet setups - what are your ways to
determine
> which environment you are in.
I wrote a custom fact, location, that embeds all the logic in a tiny
bit of
custom Ruby. (In fact, it just grabs the hostname, domain, and IP
address,
then uses a tiny bit of logic to select between them.)
Same sort of solution here. I made a location fact that maps primary
ipaddress subnet to a descriptive location string.
From there I went a different route than the extlookup() + case
method. I ended up using exported resources with 'tag => $location'
and '<<| tag = $location |>>' on the client side. If a resource
doesn't have a native Type I used the same technique with the concat
module.
Can you please explain this method a bit more, for the
unexperienced like me?
Showing the actual code would be great, if it's possible.
--
Cosimo
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-us...@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.