4

I'm testing out puppet in Amazon VPC and found out its behavior is not consistent. In Amazon EC2, puppet works out perfectly fine. But while running puppet manifests in Amazon VPC, sometimes it runs properly..sometimes not.

root@ip-10-0-0-123:~# puppet apply /etc/puppet/manifests/site.pp

dnsdomainname: Name or service not known
dnsdomainname: Name or service not known
dnsdomainname: Name or service not known
warning: Could not retrieve fact fqdn
dnsdomainname: Name or service not known
warning: Host is missing hostname and/or domain: ip-10-0-0-123

I feel that it is because of fqdn not defined properly in Amazon VPC.

Issuing 'hostname -f' throws error : hostname: name or service not known. Same happens for dnsdomainname.

Do anyone have any idea how to fix this ?

Sanket Dangi
  • 1,185
  • 9
  • 16

1 Answers1

4

Make sure the hostname of the server is included in /etc/hosts pointing to 127.0.0.1:

# hostname
puppet-test-1

/etc/hosts

127.0.0.1   localhost.localdomain localhost puppet-test-1

Puppet is extremely picky about being able to determine a local hostname.

JKG
  • 496
  • 4
  • 6