[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-13 Thread Luke Kanies
On Oct 8, 2008, at 1:00 PM, Jeff wrote: > > Thanks all. > > One question: How do I reference the last directory in the array in a > require statement? > > If I do this: > > file {["$basedir", "$basedir/src", "$basedir/src/my", > "$basedir/src/my/dir", "$basedir/src/my/dir/path" ]: > > Can I do th

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-11 Thread Aj
That's correct - if you have parent directories in your manifest, puppet will have child files/folders autorequire the parent(s). The file { [ '/foo', '/foo/bar' ]: } syntax is currently the best way to achieve this, although with a Parser function you could split a full path into an array

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-11 Thread Peter Meier
Hi >> file {["$basedir", "$basedir/src", "$basedir/src/my", >> "$basedir/src/my/dir", "$basedir/src/my/dir/path" ]: #Just pass the >> file resource an array of files. >> mode => 0755, >> owner => jeff, >> group => jeff, >> ensure => directory, >> recurse => true >> } > >

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-11 Thread Francois Deppierraz
Teyo Tyree wrote: > file {["$basedir", "$basedir/src", "$basedir/src/my", > "$basedir/src/my/dir", "$basedir/src/my/dir/path" ]: #Just pass the > file resource an array of files. > mode => 0755, > owner => jeff, > group => jeff, > ensure => directory, > recurse => true > }

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-09 Thread zoniguana
You also could do this by having your directory structure on your fileserver, of src/path/my Then file { "/home/jeff/src": mode => 0755, owner => jeff, group => jeff, ensure => directory, recurse => true; } If that directory structure is to be common across multiple users, it

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-08 Thread Teyo Tyree
Jeff wrote: > Thanks all. > > One question: How do I reference the last directory in the array in a > require statement? > > If I do this: > > file {["$basedir", "$basedir/src", "$basedir/src/my", > "$basedir/src/my/dir", "$basedir/src/my/dir/path" ]: > > Can I do this: > > require => File["$base

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-08 Thread Jeff
Thanks all. One question: How do I reference the last directory in the array in a require statement? If I do this: file {["$basedir", "$basedir/src", "$basedir/src/my", "$basedir/src/my/dir", "$basedir/src/my/dir/path" ]: Can I do this: require => File["$basedir/src/my/dir/path"] TIA, Jeff

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-08 Thread Teyo Tyree
Hey Jeff, Jeff wrote: > Hi all, > > I'd like to add a several directories and I can't seem to do it with a > single "file" directive. > > You can do this with syntax, but puppet will still be explicitly managing each directory as a separate resource: $base = "/home/jeff" file {["$basedir", "

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-08 Thread Peter Meier
Hi > file { "/home/jeff/src/my/dir/path": > path=> "/home/jeff/src/my/dir/path", > mode=> 0755, > owner => jeff, > group => jeff, > ensure => directory, > recurse => true, > } > > But puppet complains the parent directory doesn't exist. How can I do > the equivalent of >

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-08 Thread Ashley Penney
You pretty much have to use exec { "mkdir -p /path" }, sorry! On Wed, Oct 8, 2008 at 1:30 PM, Jeff <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'd like to add a several directories and I can't seem to do it with a > single "file" directive. > > Say /home/jeff exists and I want to add /home/jeff/sr