Hi all,

I'd like to specify a base_directory and a list of directories (as 
variables that may be pulled via hiera later) that will be created under 
that base directory.

base_dir = "/home/base"
bars = ["a", "b", "c"]

bars will be used to create the folders under base and also part of the 
information going into building a template so I don't want to store them as 
["$base_dir/a", "$base_dir/b", "$base_dir/c"]. 

What's the best way to create the bar directories under the base_dir? I'd 
love to just give File the bars array and specify the base_dir as a 
property. Should I make a prepend function that would prepend base_dir to 
each bar and then pass that to File? 

I tried a definition but then to loop I have to generate a single loop-able 
structure to call the definition with that contains both bars and base_dir. 
I looked at create_resources but that seems like it'd force me to make more 
things variables than I wanted and duplicate more than I would like.

Thanks,
Mark

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/WFydQrjUbdQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to