I'm trying to puppetize an amazon EC2 host. I first made sure the puppet ssl directory was empty:
[root@web3:~] #ls -lh /var/lib/puppet/ssl/
total 0
Setup my hostname in /etc/hosts
[root@web3:~] #cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
10.0.2.101 web3.company.com web3
Gave the server the hostname I wanted and verified it:
[root@web3:~] #hostname web3
[root@web3:~] #hostname
web3
[root@web3:~] #hostname -f
web3.company.com
Yet when I run the puppet command to register it with the puppet server, it still comes up with the internal ec2 ip address instead of the hostname that I'm trying to give it:
[root@web3:~] #puppet agent --test --waitforcert 60 --server puppet.company.com
Info: Creating a new SSL key for ip-10-0-2-101.ec2.internal
Info: Caching certificate for ca
Info: Caching certificate_request for ip-10-0-2-101.ec2.internal
Info: Caching certificate for ca
What am I missing here? How can I get puppet to see the hostname that I want instead of the internal IP dns given by Amazon?
I think these are the docs you are looking for http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-hostname.html
Disclaimer I've never used puppet and don't know what exactly its doing