【发布时间】:2014-09-12 15:53:15
【问题描述】:
我确定我在做一些愚蠢的事情,但我无法为stdlib keys() function 找出正确的语法,并且在互联网上找不到任何示例。
这是我尝试过的:
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,
}
这会导致这个错误:
错误:无法从远程服务器检索目录:错误 400 on 服务器:“:”处的语法错误;预期 '}' 在 /etc/puppet/modules/slony/manifests/master.pp:113 在节点 slonymaster 上
我错过了什么?我将 Puppet 3.6.2 与 stdlib 4.3.2 一起使用。
【问题讨论】:
标签: puppet