I'm running puppet 2.7.9 on a Debian Squeeze system. The box I'm targeting is named 'puppet'

# hostname
puppet

# facter | grep hostname
hostname => puppet

# cat /etc/hosts | head -n2
127.0.0.1   localhost
127.0.1.1   puppet.example.com  puppet

My node definition looks like so:

node puppet {
    include base, puppet
}

Despite the node documentation asserting that

Node names can be the short host name, or the fully qualified domain name (FQDN).

the above node definition only fires if I substitute the short host name for the FQDN or use a regular expression match, like: "/^puppet..*/". Using the short host name definition:

# puppet agent -vt
info: Caching catalog for puppet.example.com
info: Applying configuration version '1327898040'
notice: Finished catalog run in 0.64 seconds

This run should have had more output. What's going on here; what am I missing?

link|improve this question

can you paste the output of a puppet run? puppet agent -vt – Mike Jan 30 at 4:26
Sure; I've updated the text of the question to include that output. – troutwine Jan 30 at 4:37
This sounds a lot like a problem I ran into: serverfault.com/a/348196/3038 – sysadmin1138 Jan 31 at 15:35
feedback

1 Answer

I understood that the dns hostname "puppet" in the puppet world was reserved for the puppetmaster machine, if you want to target the master machine via it's own puppet server, give it a different hostname and use a dns cname as an alias. That should work, at least, it's what i do.

link|improve this answer
You're quite correct, 'puppet' is generally reserved for the puppet master and I am working on the central puppet machine. Using a CNAME alias sounds like a hack, counter to the assertions of the documentation; surely there's a better way. – troutwine Jan 30 at 13:48
well, i kind of assumed that's how its meant to be done, as my puppet server doesn't just serve puppet, and it makes moving the service to another machine easier. Maybe i'm wrong, but i think using a cname of puppet is the way it's actually meant to be done. – Sirex Jan 30 at 14:12
1  
Of course the puppet server doesn't just serve puppet. That said, maybe you are correct? I can't find any documentation to suggest that you are correct, though. The node definition should key off short host name, according to documentation, but I've always made use of the FQDN. – troutwine Jan 30 at 17:05
maybe its an undocumented, not sure. I just use the machine's real hostname though, which avoids the issue. Can only suggest trying that. – Sirex Jan 31 at 7:48
Real hostname? Do you mean the short host name? The output of $ hostname on the box in question is puppet, which I've added to the text of the question. – troutwine Jan 31 at 15:28
feedback

Your Answer

 
or
required, but never shown

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