Skip to content

Commit

Permalink
Add vars to single uri target
Browse files Browse the repository at this point in the history
  • Loading branch information
Helen Campbell committed Jan 6, 2021
1 parent 4ac0dc6 commit fed868a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tasks/provision_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ def provision(platform, inventory_location, vars)
params = platform_to_cloud_request_parameters(platform, cloud, region, zone)
response = invoke_cloud_request(params, uri, job_url, 'post')
response_hash = YAML.safe_load(response)

unless vars.nil?
var_hash = YAML.safe_load(vars)
response_hash['groups'].each do |bg|
bg['targets'].each do |trgt|
trgt['uri'].each do |ur|
ur['vars'] = var_hash
end
bg['targets'].each do |trgts|
trgts['var'] = var_hash
end
end
end
Expand Down

0 comments on commit fed868a

Please sign in to comment.