Puppet behavior incompatible with Amazon VPC

I am testing a puppet in Amazon VPC and found that its behavior is incompatible. On Amazon EC2, the puppet works great. But when running puppet manifests in Amazon VPC, sometimes it works correctly .. 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 this is due to the incorrect definition of fqdn in Amazon VPC.

Issue "hostname -f" throws error: hostname: name or service unknown. The same thing happens for dnsdomainname.

Does anyone have any ideas how to fix this?

+4
source share
1 answer

Make sure the server hostname 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 that it can determine the local host name.

+4
source

Source: https://habr.com/ru/post/1401241/


All Articles