Hi Bjørge, The clue is in looking at the code for the 'fqdn' fact:
<snippet> host = Facter.value(:hostname) domain = Facter.value(:domain) if host and domain [host, domain].join(".") </snippet> And drilling into the 'domain' fact: <snippet> if name = Facter::Util::Resolution.exec('hostname') if name =~ /.*?\.(.+$)/ $1 end elsif domain = Facter::Util::Resolution.exec('dnsdomainname') domain if domain =~ /.+\..+/ elsif FileTest.exists?("/etc/resolv.conf") domain = nil search = nil File.open("/etc/resolv.conf") { |file| file.each { |line| if line =~ /domain\s+(\S+)/ domain = $1 elsif line =~ /search\s+(\S+)/ search = $1 end } } next domain if domain next search if search end </snippet> So the 'domain' part is worked out by: * Stripping the domain part from the 'hostname' command OR * Extracting it from the 'dnsdomainname' command OR * Grabbing it from /etc/resolv.conf by looking at domain and then search ken. On Thu, Sep 8, 2011 at 12:36 PM, Bjorge Solli <bjo...@solli.priv.no> wrote: > How is fqdn generated? > > On my system it is set to it011064.uib.no, but it really should be set > to it011064.klientdrift.uib.no. Reverse dns and hostname is correct: > > root@it011064:~# facter --puppet | grep ^fqdn > fqdn => it011064.uib.no > root@it011064:~# hostname > it011064 > root@it011064:~# host $(hostname) > it011064.klientdrift.uib.no has address 129.177.11.64 > root@it011064:~# host $(host $(hostname)|awk '{ print $4 }') > 64.11.177.129.in-addr.arpa domain name pointer it011064.klientdrift.uib.no. > > Bjørge > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@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. > > -- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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.