Ask Your Question

Self refencence

asked 2018-09-13 01:33:35 -0600

michal.lukowicz gravatar image


If i have:

$files = [ '/etc/aaa',/etc/'bbb','/etc/ccc']

and then using file resource to create them like:

file { $files:
 ensure => file,

is it possible to refere somehow to item in loop so that i can:

file { $files:
 ensure => file,
 content => template("module${file}"),

I know that i can define my own type with each loop - i am interested if maybe i don't have to.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-21 11:19:48 -0600

WhatsARanjit gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-09-13 01:33:35 -0600

Seen: 142 times

Last updated: Sep 21