From 6d4d78c532819bfaaab6baadbc089d803271d9db Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Wed, 17 Jul 2019 17:55:34 -0400 Subject: [PATCH] Pass verbosity through for ansible playbook automate methods --- .../embedded_ansible/automation_manager/playbook_runner.rb | 1 + .../automation_manager/playbook_runner_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner.rb index 22f3b7687efb..a4a8efda5315 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner.rb @@ -51,6 +51,7 @@ def translate_credentials!(launch_options) limit network_credential_id vault_credential_id + verbosity ].freeze def launch_ansible_tower_job diff --git a/spec/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner_spec.rb b/spec/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner_spec.rb index 822648866a74..f4d4d8dea2bf 100644 --- a/spec/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner_spec.rb +++ b/spec/models/manageiq/providers/embedded_ansible/automation_manager/playbook_runner_spec.rb @@ -83,10 +83,10 @@ end context 'with launch options' do - let(:options) { {:job_template_ref => 'jt1', :extra_vars => {:thing => "stuff"}} } + let(:options) { {:job_template_ref => 'jt1', :extra_vars => {:thing => "stuff"}, :verbosity => "4"} } it 'passes them to the job' do expect(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Job).to receive(:create_job) - .with(an_instance_of(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScript), :hosts => ["localhost"], :extra_vars => {:thing => "stuff"}) + .with(an_instance_of(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScript), :hosts => ["localhost"], :extra_vars => {:thing => "stuff"}, :verbosity => "4") .and_return(double(:id => 'jb1')) expect(subject).to receive(:queue_signal) subject.launch_ansible_tower_job