Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ 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
$ hostname
$ facter | egrep '(host|domain)'
domain =>
hostname => ec2-107-22-XXX-XXX
$ cat /etc/debian_version 

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!

share|improve this question
Had the same hostname issue and adding it as first alias in hosts fixed the problem for me too. Debian Squeeze. – user113065 Mar 6 '12 at 11:07
up vote 0 down vote accepted

Blah, it seems it parses /etc/hosts and my beautiful hostname should be the first alias for '' ( 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.

share|improve this answer
Puppet tries to get the reverse to the IP address -- I'm surprised did it for you. It also looks up /etc/resolv.conf for the domain. Have you tried just grepping ec2-... on /etc to see what configuration contains that? – Daniel C. Sobral Nov 16 '11 at 11:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.