To be able to do this with purge I need to pass the list of subdirectories 
I want to exist to source attribute, but I'm not sure I can do this

On Monday, February 4, 2013 2:57:20 PM UTC+2, 刘长元 wrote:
>
> "but this does not remove the directories from the node if I remove them 
> from deployment.yml.   maybe purge attribute can  do this.
>
> On Monday, February 4, 2013 7:58:37 PM UTC+8, Andriy Yurchuk wrote:
>>
>> 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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to