--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Hf6ReeSy2mE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b9c95f80-9ae3-439b-a451-17327291524d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The tree has to already exist.
One would think having the ability
to instantiate a tree from a seedling would be useful.
Sent from my iPhone
--I want to recursively descend infinitely through a directory tree in regards to ensuring:(a) owner, group, permission(b) existence of the full path, all the leaves, out to the final leaf, e.g./somedir/somesubdir/{file1,file2,file3,somesubdirtoo} and so forthThis could be done trivially with an exec but is not pure-Puppet-ecosystem, obviously.So my questions are, from a Puppet-puritan-perspective:is there a way to do (a)is there a way to do (b)is there a way to do (a)+(b)and last:is there a way to do (a)+(b) in a reasonable period of time for a shallow tree of few leavesYours in squirrelhood,Stuart
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Hf6ReeSy2mE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscribe@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Hf6ReeSy2mE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/594141407.88154.1387317298820.JavaMail.root%40sz0126a.westchester.pa.mail.comcast.net.
> > 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,
}
file { '/var/lib/nagios/plugins':
ensure => directory,
recurse => true,
mode => '0775',
}
file { '/var/lib/nagios/plugins':
ensure => directory,
recurse => true,
mode => '0775',
}
On 2013-12-17, 16:31, Ben Ford wrote:
> If you override something in a recursive directory, you're
> overriding everything.
I see, that makes sense.
> If you add source => 'puppet:///modules/nagios/var_lib_nagios/plugins' then
> I suspect you'll get what you want.
You are right, that did it. Thanks!
> I should also point out that this is unnecessary, as Puppet will
> automatically promote read permissions to read & execute permissions
> for directories.
No, not exactly as the mode definition is meant for the files in the
subdirectory. There are executables in "bin" and "plugins".
So, what would be a better way of changing the mode of some files
within a directory resource with "recurse" activated? Adding "source"
for all of them seems awkward...