Chef - how to use a list of attributes in a script

后端 未结 3 1576
别跟我提以往
别跟我提以往 2020-12-22 14:00

I\'m newbie in Chef and I want to execute a script to add users in my system. I have a cookbook in chef called usersinto and attributes:

node.default[\"use         


        
3条回答
  •  庸人自扰
    2020-12-22 15:02

    The way you have it, the value of node["usersinto"]["users"] is an array with one element (which is a string). This probably isn't what you wanted, either make it a single string or an array of multiple strings. In either case, as written you would want #{node["usersinto"]["users"].first}.

提交回复
热议问题