From ae80feae146f457bb9a25ea88f364506a09d8fa0 Mon Sep 17 00:00:00 2001 From: Fabien Dupont Date: Mon, 24 Feb 2020 07:54:35 -0500 Subject: [PATCH] Split extra vars for Ansible playbooks --- app/models/conversion_host.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/conversion_host.rb b/app/models/conversion_host.rb index e6a3847fdec..03f68406ee4 100644 --- a/app/models/conversion_host.rb +++ b/app/models/conversion_host.rb @@ -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)