On Monday, October 21, 2013 2:37:10 AM UTC-5, Andreas Dvorak wrote: > > Hi, > > I have a file resource that brings files in the diretory > "/usr/local/nagios/libexec" from source1 and I have a second resource file > that should bring file in that same directory but from an other source. > But the result is that only the files from file { > "/usr/local/nagios/libexec": do exit in the directory. I tried remote and > true. The resource file { "/usr/local/nagios/libexec": deletes all the > files in the directory "/usr/local/nagios/libexec" that came with file { > "/usr/local/nagios": > Can somebody please help me? >
That sounds like the behavior that would be expected with "purge => true". I didn't think that was the default, but perhaps you have a resource default override in scope. If you want to purge unmanaged files, then it is sufficient to enable purging for only File['/usr/local/nagios']; enabling it also for File['/usr/local/nagios/libexec'] (or any other subdirectory) will have the result you describe, because the latter resource is applied independently of the former. Overall, it is unwise to manage the same physical resource via more than one Puppet logical resources, which is what you are doing with directory /usr/local/nagios/libexec. If you can come up with an alternative approach to avoid that problem then you would be better off. John -- 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. For more options, visit https://groups.google.com/groups/opt_out.