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.

For Puppet clients to report results back to the master server, "report = true" needs to be in the "[agent]" section of the client's puppet.conf. But how can I get Puppet to enforce that?

It's disabled by default, but all the resources I can find online seem to suggest doing it manually as if it's no big deal. Maybe it isn't, but isn't automating/enforcing basic server configuration exactly what Puppet is intended to do?

I'm new to Puppet, but this seems like a common and trivial task that I can't seem to find a solution for. Is there something I'm misunderstanding? Or is this really an uncommon/difficult task?

share|improve this question
    
You're using puppet, aren't you? Serve the machines your own puppet.conf and have the puppet agent service subscribed to the file. –  Michael Hampton May 1 '13 at 19:56
    
Is that going to be safe across operating systems, though? There are a lot of other things declared in puppet.conf that look like they'd vary. –  Moduspwnens May 1 '13 at 20:00
    
Create a fact which identifies the OS and then have your template reference that fact to replace appropriate parameters per OS, or just have a different file served based on the OS. –  Doug May 1 '13 at 20:42
    
I guess that'd work, but then I'd have to keep track of what all the defaults are for each OS and update those as they change with new releases. That just seems over-the-top unnecessary for something that is apparently pretty typical--even more so considering the purpose of the software. –  Moduspwnens May 1 '13 at 22:35
2  
Differences amongst operating systems are gracefully handled using hierarchical data. Create a hiera data structure based on the operatingsystem fact, or use custom facts under /etc/facter/facts.d if you need to. –  dawud May 1 '13 at 23:06
show 1 more comment

1 Answer

The inifile module will let you specify just a single line in your puppet.conf file. You might still need some additional OS-based rules to get the full path to that file, but that should be easier than managing all of your defaults all the time.

share|improve this answer
add 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.