On Jun 6, 6:40 pm, Larry Ludwig <larry...@gmail.com> wrote:
> I have an issue where for a file type of an exported resource I must define
> as such:
>
>                 force    => false,
>                 replace  => false,
>
> Meaning the file is created, but do not replace after it's added. I do this
> because of the app modifies the config file after (I know bad idea on their
> part).
>
> How can I ensure this file is removed when I remove the node from the
> storeconfig database?


1) [ugly] You can create a local resource for each such file, with
ensure => absent

2) You can manage the files' directory and all files and
subdirectories in it, and use recurse => true, purge => true on the
directory

Note that both of these cause the file to *remain* absent, though the
latter will adapt dynamically if the file in question becomes managed
again.


> In general, is there a way to trigger a event puppet when a instance is
> removed?


No.  Puppet has no concept of node removal, and the master operates on
behalf of a particular node only when that node requests a catalog,
which a removed node cannot do.  More generally, Puppet has no concept
of un-managing anything.


John


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to