Tuesday, March 13, 2012

Puppet extlookup

This is a follow up post to dealing with differences in different environments. Puppet has a function called extlookup although written awhile ago it was introduced as a core function in puppet 2.6.1. The function allows you to look up external values stored in a simple csv file and will search through a file based off a hierarchy you can define. The example that is given in the documentation worked perfectly for my particular setup as my physical networks each have their own domains; so for example I have a yum server and a DNS server that should be different based off where the servers are located and these differences can be determined by the domain.
I wish I had a nice howto to plop down here, but really it took no time to setup and was trivial to setup and the default install options were what I wanted. I just hope it gets added to the best practice section of the puppet wiki at least for smaller networks where an ENC is not in place.