You could wrap it in a defined resource ...?
$file_list = [ “filea”, “fileb”, “filec”]
define filelinks() {
file { $name:
ensure => link,
path => “/some_directory/${name}”,
target => “/someother_directory/${name}”,
}
}
filelinks { $file_list: }
ken.
On Wed, Oct 26, 2011 at 5:33 PM, Marc Richman
<Marc.Richman@livewiremobile.com> wrote:> I have a bunch of files in some directory that I need to link to someother
> directory
>
> What I want to do is something like this:
>
>
>
> $file_list = [ “filea”, “fileb”, “filec”]
>
>
>
> file {$file_list:
>
>
>
> ensure => link,
>
> path => “/some_directory/<how_can_I_refer_to_namevar>”,
>
> target => “/someother_directory/<how_can_I_refer_to_namevar>”,
>
> }
>
>
>
> So, the question is what do I replace <how_can_I_refer_to_namevar>
with to
> make this work
>
> I know I could have $file_list be the full path to the files, but I would
> rather not do that
>
>
>
> Thanks for any help
>
> Marc
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
> 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 puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.