[英]Error: undefined method `symbolizehash!' for Puppet::Util:Module when using create_resources
如果我嘗試使用http://docs.puppetlabs.com/references/latest/function.html#createresources中所示的create_resources:
class foobar
{
$myusers = {
'nick' => { uid => '1330',
group => allstaff,
groups => ['developers', 'operations', 'release'], },
'dan' => { uid => '1308',
group => allstaff,
groups => ['developers', 'prosvc', 'release'], }
}
create_resources(user, $myusers)
}
我收到此錯誤:
Error: undefined method `symbolizehash!' for Puppet::Util:Module
我該如何工作!?
您提供的代碼不是源代碼的直接副本。
group => allstaff,
^實際上應該是:
gid => allstaff,
關鍵是,“組”不是“用戶”資源的有效參數。
啊,沒關系; 我自己使用定義的#create_resources的舊模塊。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.