-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make embedded ansible verbosity and execution_ttl work #18989
Make embedded ansible verbosity and execution_ttl work #18989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few questions, but I think this looks fine.
5b9bb52
to
7ff2557
Compare
f410e3c
to
6473b88
Compare
|
||
response = Ansible::Runner.run_async(env_vars, extra_vars, playbook_path, :hosts => hosts, :credentials => credentials) | ||
response = Ansible::Runner.run_async(env_vars, extra_vars, playbook_path, :hosts => hosts, :credentials => credentials, :verbosity => verbosity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to get slightly tighter code here with something like
env_vars, extra_vars, playbook_path = options.values_at(:env_vars, :extra_vars, :playbook_path)
kw_args = options.slice(:credentials, :hosts, :verbosity)
response = Ansible::Runner.run_async(env_vars, extra_vars, playbook_path, kw_args)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously this option was being ignored and the job timeout was always the default of 1.hour
6473b88
to
6d4d78c
Compare
6d4d78c
to
40f33b0
Compare
Checked commits carbonin/manageiq@409c322~...40f33b0 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 lib/ansible/runner.rb
|
network_credential_id | ||
cloud_credential_id | ||
vault_credential_id | ||
verbosity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alphabet Dance! 🕺
This PR adds what is needed to
Ansible::Runner
to get verbosity working correctly and also passes the option down from services and automate.The PR also configures the
AnsiblePlaybookWorkflow
timeout using theexecution_ttl
from the service.This seems to have been completed for playbook automate methods (albeit slightly differently) in #17476
cc @NickLaMuro @Fryguy @bzwei @tinaafitz