I'm trying to implement a custom recursive directory synchronization
resource in Puppet. What I need to do is the following.
I have a YAML file with the list of hostnames and the list of directories
that should exist on each hostname inside, say, `/var/lib/my_app` directory
(`deployment.yml`):
host_1:
- DIR_1
- DIR_5
host_5:
- DIR_7
host_6:
- DIR_2
- DIR_3
- DIR_9
On the master I have a directory that contains all of those `DIR_*`
sub-directories. Each subdirectory contains some files. What I'm trying to
achieve is to synchronize all the nodes according to the `deployment.yml`,
so that `/var/lib/my_app` on `host_1` only contains `DIR_1` and `DIR_5`,
but does not contain `DIR_7`, `DIR_2`, `DIR_3`, `DIR_9`, and so on.
I tried to do this using the ignore variable for file type, but this does
not remove the directories from the node if I remove them from
deployment.yml. I tried to write a custom function to remove them
afterwards, but it does not seem to work inside my manifest. I also wanted
to implement a custom type, but it seems to be too complicated.
I'd appreciate any help on this.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.