-
-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
π£οΈ Foreword
Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.
π» Brief Description
I am trying to create users from a databag, but nothing is getting created and the recipe seems to process successfully.
π₯ Cookbook version
8.0.0
π©βπ³ Chef-Infra Version
17.3.48
π© Platform details
AWS EC2: Amazon Linux 2 (latest)
Steps To Reproduce
Setup my recipe to include the example
Get the users from the data bag
users_from_databag = search('users', 'groups:users OR groups:op')
if node["authorization"]["groups"]
node["authorization"]["groups"].each do |group|
next unless group
users_manage group do
action [ :create ]
end
users_manage group do
action [ :remove ]
end
end
end
users_manage 'sysadmin' do
group_id 2300
action [:create]
users users_from_databag
end
π Expected behavior
I would expect all users to get created.
β Additional context
The output of the search command returns an array of this type
data_bag_item["users", "atrbojevic", {"id"=>"atrbojevic", "shell"=>"/bin/bash", "ssh_keys"=>["<<PRIVATE_KEY_STRING>> *******@realnetworks.com"], "groups"=>["users"]}]
Attribute: default['authorization']['groups'] = [ 'users','ops' ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels