Ask Your Question
0

Self refencence

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

michal.lukowicz gravatar image

Hello

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
0

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

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

Stats

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

Seen: 116 times

Last updated: Sep 21