Is it possible to merge two 'file' trees?

36 views
Skip to first unread message

JonY

unread,
Oct 28, 2014, 2:54:25 PM10/28/14
to puppet...@googlegroups.com
Situation: folder tree that gets installed via 'file' resource. In some circumstances I want to add files/ folders to this tree. 

Given that the tree is 100% puppet controlled if I add the extra files they will get booted out.. right? 

Is there some way to tell puppet to accept the extra bits (under some circumstances)?

jcbollinger

unread,
Oct 28, 2014, 4:55:39 PM10/28/14
to puppet...@googlegroups.com


On Tuesday, October 28, 2014 1:54:25 PM UTC-5, JonY wrote:
Situation: folder tree that gets installed via 'file' resource. In some circumstances I want to add files/ folders to this tree. 

Given that the tree is 100% puppet controlled if I add the extra files they will get booted out.. right? 


It depends on what you mean by "100% puppet controlled."  Unless you have gone to some effort to ensure that, Puppet is probably asserting less control than you think.

To start, unless you are using both 'recurse => true' and 'purge => true', Puppet will ignore files in the local tree that do not have corresponding files in the source tree.  Even when purging is enabled, individual managed Files can safely be placed in the recursively-managed directory tree.  In addition, Puppet will not purge directories themselves (only their contents) unless you also set 'force => true'.  Furthermore, the 'recurselimit' setting can be used to limit how much of a directory tree is actually managed; that might be useful to you depending and where you want to put unmanaged files relative to managed ones.


John

Reply all
Reply to author
Forward
0 new messages