Skip to content

Commit

Permalink
Merge pull request #19864 from fdupont-redhat/v2v_conversion_host_fix…
Browse files Browse the repository at this point in the history
…_extra_vars

Split extra vars for Ansible playbooks

(cherry picked from commit d61bf49)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1806643
  • Loading branch information
Fryguy authored and simaishi committed Feb 24, 2020
1 parent d5ffc54 commit 783357b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/conversion_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def ansible_playbook(playbook, extra_vars = {}, miq_task_id = nil, auth_type = '
raise MiqException::MiqInvalidCredentialsError, _("Unknown auth type: %{auth_type}") % {:auth_type => auth.authtype}
end

params << {:extra_vars => "'#{extra_vars.to_json}'"}
extra_vars.each { |k, v| params << {:extra_vars= => "#{k}='#{v}'"} }

command = AwesomeSpawn.build_command_line("ansible-playbook", params)
result = AwesomeSpawn.run(command)
Expand Down

0 comments on commit 783357b

Please sign in to comment.