Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stromweld committed Mar 3, 2024
1 parent 1452119 commit f86f33c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions recipes/chef_automatev2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,18 @@
end
end

test = lazy { shell_out('chef-automate iam token create admin --admin').stdout.strip }

node['chef_software']['automatev2_local_users']&.each do |name, hash|
iam_user name do
user_hash hash['user_json']
api_token kitchen? ? test : node['chef_software']['automate_admin_token']
api_token kitchen? ? lazy { kitchen_api_token } : node['chef_software']['automate_admin_token']
action :create
end
end

node['chef_software']['automatev2_iam_policies']&.each do |name, hash|
iam_policy name do
policy_hash hash['policy_json']
api_token kitchen? ? test : node['chef_software']['automate_admin_token']
api_token kitchen? ? lazy { kitchen_api_token } : node['chef_software']['automate_admin_token']
action :create
end
end
Expand Down

0 comments on commit f86f33c

Please sign in to comment.