Hi James,
I think I've done it correctly.
Installed facter is 1.5.1 from lenny (package revision 0.1).
After one has installed the nis utils, we can set the domainname to a
domain to something thats not even remotely like your real domain (but
does exist in the global DNS).
Running "facter fqdn" will report our hostname with the new nis domain
instead. If I set the domainname to something that doesn't exist,
facter will do the right thing (what I would expect).
Tried it again on another server:
buildbox2:~/git/facter {50} # domainname google.com
buildbox2:~/git/facter {51} # dnsdomainname
domain.net
buildbox2:~/git/facter {52} # hostname --fqdn
buildbox2.domain.net
buildbox2:~/git/facter {53} # facter fqdn
buildbox2.google.com
buildbox2:~/git/facter {54} # bin/facter fqdn (thats from git, commit
8191322766b19a5e3b2bc01cf6e14112fbd57031)
buildbox2.google.com
buildbox2:~/git/facter {57} # domainname google
buildbox2:~/git/facter {58} # facter fqdn
buildbox2.domain.net
Interesting facts.
Regards,
On Aug 6, 5:04 pm, James Turnbull <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kai wrote:
> > Hi Ohad,
>
> > On Aug 6, 3:52 pm, Ohad Levy <[email protected]> wrote:
> >> it depends on the version of facter that you have, older version of facter
> >> just used the output from domainname.
> >> newer try first the dnsdomainname and fallback to the domainname.
>
> > As far as I know the command 'domainname' doesn't ever relate to the
> > hostname. Perhaps its the same on a lot of servers in the wild, but
> > the NIS domainname could be 'test'.
>
> Try seeing what FActer's output is - run facter on the command line
> and see what is returned for hostname and domain. These are usually
> what Puppet uses to name certs.
>
>
>
> >> to be safe, use the cert option in your puppet.conf
>
> > That will be interesting: that file is supplied by puppet. Will the
> > hostname in puppet reflect the real hostname, or will it again
> > formulate its own by putting the NIS domain in it again? :)
>
> He means the certname option
> -http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference
>
> Regards
>
> James Turnbull
>
> - --
> Author of:
> * Pro Linux Systems Administration
> (http://tinyurl.com/linuxadmin)
> * Pulling Strings with Puppet
> (http://tinyurl.com/pupbook)
> * Pro Nagios 2.0
> (http://tinyurl.com/pronagios)
> * Hardening Linux
> (http://tinyurl.com/hardeninglinux)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iD8DBQFKevDu9hTGvAxC30ARArzcAJ9qG/2Yai9xk+YOcDY6TqdvHQUWIgCeNKu1
> KifDWd78+/HmeVsEAxL1j0Y=
> =wULf
> -----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---