0
我敢肯定我在做一些愚蠢的事情,但我無法找出stdlib keys() function的正確語法,並且在互聯網上找不到任何示例。傀儡stdlib鍵()函數語法錯誤
這裏是我試過:
file { ["/tmp/file1", "/tmp/file2"]: # <-- this works as expected
ensure => present,
}
$hash = {"/tmp/file1" => 1, "/tmp/file2" => 2}
file { keys($hash): # <-- syntax error occurs here
ensure => present,
}
它導致這個錯誤:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at ':'; expected '}' at /etc/puppet/modules/slony/manifests/master.pp:113 on node slonymaster
我缺少什麼?我在stdlib 4.3.2中使用Puppet 3.6.2。
這樣做的伎倆,謝謝! – aco