Trying out puppet
By martin on Apr 08, 2008
I'm looking for ways to better manage our servers, and right now I'm playing with puppet.
I immediately ran in to a problem: it picked the wrong domain name. Internally at Sun we use NIS (yes, I know it is insecure and sucks in almost all aspects, but I'm not in position to change it - and believe me I have tried) and our NIS domain name doesn't match the DNS domain name.
This is something puppet (facter to be exact) doesn't figure out, at least not on Solaris.
Instead of picking the correct fqdn for a host, e.g.
since that is what the
domainname command returns.
They tried to
this, but unfortunately it doesn't work for Solaris,
as it relies on the
dnsdomainname which we don't have.
I've worked around it by creating my own
/usr/bin/dnsdomainname which gets called before
#!/bin/sh DOMAIN="`/usr/bin/domainname 2> /dev/null`" if [ ! -z "$DOMAIN" ]; then echo $DOMAIN | sed 's/\^[\^.]\*.//' fi
So now I can continue to test my puppet configurations...