On 05/08/13 04:33 PM, puppetl...@downhomelinux.com wrote:
> On Mon, Aug 05, 2013 at 04:22:41PM -0400, Gabriel Filion wrote:
>>
>> you need to export the resource with ensure => absent and run puppet on
>> the host, then on the nagios server so that everything runs fine.
> 
> Dozens of VMs are routinely destroyed on a weekly basis and in an
> automated fashion based on load. The nagios_*.cfg files are
> automatically changed, why is the notify not triggering?
> 
>> however in your example, you seem not to be redefining the "target" when
>> collecting, so you might consider using purge => true. to achieve what
>> you want with the workflow you mentioned above (e.g. without the need to
>> export with ensure => absent)
> 
> I am purging unless you are referring to a different resource stanza.
> From my OP:

ah, so that's why the config is updated automatically then..

I can't use purging in my environment because of the annoying limitation
with the "target" argument, so the best I can do now is to pull one
suggestion out of my hat:

if you try and add the notify here, maybe it'll catch removals too?

> resources { [ "nagios_host", "nagios_service" ]:
>   purge => true,
    notify => Service['nagios'],
> }

it might complain about the notify lines in the collection.. not
entirely sure. if so, try to remove the line at the collection point.

-- 
Gabriel Filion

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to