site.pp location for 3.7.1 under environment configs.

71 views
Skip to first unread message

Monkeys Typing

unread,
Oct 2, 2014, 3:13:46 PM10/2/14
to puppet...@googlegroups.com
I am attempting to get the final pieces of the Puppet Pulse splunk app to work, and the issue I am having is that the splunk application expects the puppet nodes to have an extra notify that calls out the version of puppet on the box.  The readme for the app indicates:

#### Version Reporting ####

To gather version information, add the following to your manifests (I have it
towards the top of my site.pp, outside of any node definitions):

    info("node=${::hostname} puppetversion=${::puppetversion}")

AFAICT, the proper directory for this file is still /etc/puppet/manifests/site.pp.  At least that is what "puppet agent--environment production --configprint manifest" tells me.

However, I have not been able to get this info to trigger on any of my nodes or puppet masters.  Full disclosure, i have a puppetmaster manifest that creates a symlink of this file to the real location of /<puppet code>/environments/site.pp  (had also tried putting site.pp at environments/production/site.pp

Just wondering what I am doing wrong, and if there is a better place to put the info line.  I have a class "minimal" that EVERY node gets, and I could move my info declaration there.

It isn't clear to me exactly what site.pp is used for (or if it IS used) under environment configs.

Thanks,

Jim Goddard

Wil Cooley

unread,
Oct 3, 2014, 2:12:05 AM10/3/14
to puppet-users group

Hi Jim,

You can put the info function call anywhere really - you just want to ensure everything sees it or you will miss nodes; your minimal class is fine.

This is one of those features that should probably be changed to use a PuppetDB query (which I didn't have until recently) or dropped if it's already present in the PDB boards.

It was a quick hack that worked well enough and has proven to be really handy when doing upgrades.

Wil

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/64260c57-74c2-4a32-b452-99a9c36bed6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages