Profile variable

asked 2017-06-13 00:49:54 -0600

bigfoot74 gravatar image

updated 2017-06-13 00:55:06 -0600

Hello,

I am working with icinga2 and puppet 4. We add our services in 3 different ways, and I would like to display in icinga2_services in notes the profile where it was added. Just for later use, if something goes wrong. I would know where to look :-) So I using e.g. an apache profile called profile::apache::httpd::server. And in this profile I add all the httpd services. And the notes look like this:

notes => ''origin: profile::apache::httpd::server',

Is there a way in puppet to use a variable/fact for that ?

Cheers,

  • Pascal
edit retag flag offensive close merge delete

Comments

K i don't quite understand what your after but do you just want to see which services are managed by puppet and which are defined by something/someone else in your environment? You can request this with the puppetdb resources endpoint i think. Then you can rework the code into a costum fact i guess.

negast gravatar imagenegast ( 2017-06-14 03:49:47 -0600 )edit