On Wednesday, January 21, 2015 at 5:43:05 AM UTC-6, Jonathan Gazeley wrote:
>
> Hi folks, 
>
> My legacy puppet code includes a manifest called httpd::vhost which 
> installs an Apache vhost and does some extra things, like add Nagios 
> checks. 
>
> I'm now removing my old httpd::vhost module and switching to 
> puppetlabs/apache, and using apache::vhost. This means I now have to 
> manually remember to add a Nagios check for each instance of 
> apache::vhost. 
>
> Is there a neat way to automatically have something insert Nagios checks 
> for each instance of apache::vhost without manual intervention? 
>
>

If you mean "is there a good way to inspect the catalog while it is being 
built, to determine what apache::vhost resource have been declared and 
declare additional resources based on that information", then the answer is 
"no".  You can stop at "inspect the catalog while it is being built"; the 
details don't matter.

You could, however, create a wrapper type, say site::apache_vhost, that 
declares an apache::vhost and all the corresponding Nagios checks you 
want.  Use that instead of using apache::vhost directly and you're good.


John

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/70af0c77-f964-46ef-8a11-e198576ad4d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to