puppet 3.1.1 - wrong domain and fqdn in facter.

978 views
Skip to first unread message

Rafał Radecki

unread,
Jun 19, 2013, 4:24:31 AM6/19/13
to puppet...@googlegroups.com
Hi All.

I am using:

#rpm -qa | egrep 'puppet|facter'
puppetlabs-release-6-7.noarch
puppet-3.1.1-1.el6.noarch
facter-1.7.1-1.el6.x86_64

on:

#cat /etc/redhat-release ; uname -r 
CentOS release 6.4 (Final)
2.6.32-358.11.1.el6.centos.plus.x86_64

My hostname is server.one.two.com:

# hostname
# hostname --fqdn

#grep HOSTNAME /etc/sysconfig/network
HOSTNAME=server

# egrep 'domain|search' /etc/resolv.conf 

But in facter:

# facter | egrep 'hostname|domain|fqdn'
domain => two.com
hostname => server

Has anyone got a similar problem? What can be done to solve it?

Best regards,
Rafal Radecki.

David Schmitt

unread,
Jun 19, 2013, 4:55:04 AM6/19/13
to puppet...@googlegroups.com
On 19.06.2013 10:24, Rafał Radecki wrote:
> My hostname is server.one.two.com:
>
> # hostname
> server.one.two.com
> # hostname --fqdn
> one.two.com

This is wrong. "hostname" should return either "server" or
"server.one.two.com" and "hostname --fqdn" should return
"server.one.two.com" (the Fully Qualified Domain Name).

> But in facter:
>
> # facter | egrep 'hostname|domain|fqdn'
> domain => two.com
> fqdn => server.two.com
> hostname => server
>
> Has anyone got a similar problem? What can be done to solve it?

Facter is confused by your inconsistent setup. Fix that and facter will
work too.


Regards, David

Reply all
Reply to author
Forward
0 new messages