Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

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

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.

share|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 '12 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 '12 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 '12 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 '12 at 7:48
1  
to clarify (as this question just wen't back to the top of SF), the node should be called anything else, myserver01 or such, and use that for matching the node name, not 'puppet' (which would be the cname) –  Sirex Aug 13 '13 at 20:57
show 1 more comment

Your Answer

 
discard

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.