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
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
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
>> }
>
>
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
> }
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
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
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
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", "
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
>
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
10 matches
Mail list logo