Ask Your Question
0

specify file variable to create file in multiple locations

asked 2015-07-06 10:31:55 -0500

user42326 gravatar image

I have a need to copy the same file to a few locations on a specific server. Is there a way to setup a variable so puppet checks multiple locations?

For example, file exists: /folder1/file.txt /folder2/file.txt /folder3/file.txt

file { 'file.txt' path => "///$var/file.txt", }

Can $var contain something like "/folder1/:/folder2/:/folder3/" ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-06 22:59:02 -0500

user42326 gravatar image

I actually got this to work putting paths in brackets.

["/folder1/file.txt","/folder2/file.txt","/folder3/file.txt"]

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: 2015-07-06 10:31:55 -0500

Seen: 97 times

Last updated: Jul 06 '15