I'm running ec2 debian instance and trying to get puppet working on it. I'd like my hostnames to be something more readable, so I've changed /etc/hostname
, run /etc/init.d/hostname.sh start
and I can see my human-readable hostname in the prompt. Every other app seems to be working fine with it, but not puppet (and actually it seems it's facter problem):
$ cat /etc/hostname
service.XXX.com
$ hostname
service.XXX.com
$ facter | egrep '(host|domain)'
domain => compute-1.amazonaws.com
hostname => ec2-107-22-XXX-XXX
$ cat /etc/debian_version
6.0.1
I've already cheched facter code and it seems it does not anything more than parsing hostname
output. Where is this thing come from? I want my hostnames!
Blah, it seems it parses /etc/hosts and my beautiful hostname should be the first alias for '127.0.0.1' (
127.0.0.1 service.XXX.com localhost localhost.localdomain ...
). Anyone knows, is this expected behavior?I'm still not sure where ec2-blah-blah-blah comes from, but it seems the issue is resolved.