I'm using hiera to define a list of database engine id's for a node. I'm
using this variable to feed into a defined type to create a set of files
(upstart configs). The problem I would like to solve isŠ.

How do I delete files/resources that were previously created but are now
removed (without deleting files that are there by default)?

Here is an example (Please ignore syntax. I hope it's clear what I'm trying
to do. If not, let me know).

- 1
- 2

define upstart{
ensure => file,
content => template('queue/upstart.conf.erb'),
# The below would be nice, but is not supported
#purge => true,
#ignore => !(queue*)

define queue {

Puppet apply will create the following files correctly:

Now I update the hiera config file to only include 1 engine:

- 1

But the /etc/init/queue02.conf file is not removed.

I can't purge the directory because there are other scripts in that
directory that I do not want to remove.
If ruby supported extended globs I could use the purge and ignore parameters
to accomplish this.

Is there a good pattern for handling this?

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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
postedAug 28, '12 at 7:51p
activeAug 28, '12 at 7:51p

1 user in discussion

Glenn Poston: 1 post



site design / logo © 2022 Grokbase