If you override something in a recursive directory, you're overriding everything. The subdirectories are being managed explicitly by the resource managing them, not by a combination of it and the parent. Look inline below:
On Tuesday, December 17, 2013 11:12:21 AM UTC-8, Andy Spiegl wrote: > > > > > http://christian.hofstaedtler.name/blog/2008/11/puppet-managing-directories-recursively.html > > > I thought I had understood recursive directory management. It worked > fine until I switched to puppet v3 (Debian 3.3.2-1puppetla to be exact) > Since then, files in subdirs aren't copied anymore. > > An example: > File { > owner => "nagios", > group => "nagios", > mode => '0644', > } > file { '/var/lib/nagios': > ensure => directory, > source => 'puppet:///modules/nagios/var_lib_nagios', > recurse => true, > } > Manages /var/lib/nagios with recurse true. file { '/var/lib/nagios/plugins': > ensure => directory, > recurse => true, > mode => '0775', > } > Completely takes precedence over File['/var/lib/nagios'] and manages '/var/lib/nagios/plugins' telling Puppet that all you care about is that it's a directory with mode 775. Notice that you no longer have a source for this subdirectory, so it's explicitly not managed. If you add source => 'puppet:///modules/nagios/var_lib_nagios/plugins' then I suspect you'll get what you want. > file { '/var/lib/nagios/bin': > ensure => directory, > recurse => true, > mode => '0775', > } > > lama:~/.../puppet/modules/nagios> ls -la files/var_lib_nagios > total 8 > drwxrwxr-x 2 andy users 4096 2013-11-15 15:56:23 bin/ > drwxrwxr-x 2 andy users 4096 2013-11-25 12:01:14 plugins/ > > Why aren't these directories copied to /var/lib/nagios? > I tried setting recurselimit to '2' but that didn't help either. > > Thanks for any hint! > Andy. > > > -- > A mathematician is a machine for converting coffee into theorems. > (Alfred Renyi) > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/80da2632-5cc6-453f-96f6-c01d1e9b85a1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.