嘗試使用僞STDLIB模塊的成員函數:使用成員函數時木偶STDLIB「成員」功能不工作
$myvariable = 'FOO'
然後:
member(['FOO','BAR'], $myvariable)
有效我不斷收到錯誤消息:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Function 'member' must be the value of a statement at /etc/puppet/modules/mymodule/manifests/init.pp:###
@MattSchuchard在他的回答中解釋了錯誤信息,但我不禁想到錯誤必定是另一個問題的症狀。畢竟,調用'member()'函數並忽略結果會有什麼意義?這種事情是我們傾向於請求[mcve]的原因之一。 –