On Fri, Dec 3, 2010 at 12:48 PM, Don Jackson <
[email protected]> wrote:

>
> So here is a scenario:
>
> I have a directory:
>
>        ./foo
>        ./foo/file1
>        ./foo/file2
>        ./foo/file3
>        …
>        ./foo/fileN
>
> I populate this directory on a configured machine via a recursive file
> resource.
>
> What I would like to do is create a symlink from the parent directory to
> each filen in the foo subdirectory?
>
> Is there some easy way to get puppet to do that?
>
> Basically I would like to iterate thru
>
>        ln -s ./foo/filen ./filen
>
> Short of writing a shell script, downloading it, and Exec'ing it?
>

Performing iteration through arrays is currently difficult using Puppet's
DSL. Starting in 2.6.x, it is possible to write manifests in Ruby. It is
currently not documented sufficiently, but here is a blog that demonstrates
the capability.

http://www.puppetlabs.com/blog/ruby-dsl/

-Dan





>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to