are there iterators and loops in puppet?
-
29-10-2019 - |
문제
When I define(?) a resource e.g. to ensure dir structure, are there any loops available?
Like that:
for X in [app1,app2] do:
file { '/opt/app/' + X:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0644',
}
I have tens of directories and I am really tired with declaring it in puppet.. It would take 15 LOC of bash.
Any ideas?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow