diff --git a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb index be691cb6259b..9dd87446dae4 100644 --- a/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb +++ b/app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb @@ -34,7 +34,10 @@ def run(vars = {}) playbook_vars = { :playbook_path => parent.path } credentials = collect_credentials(vars) - workflow.create_job({}, extra_vars, playbook_vars, vars[:hosts], credentials).tap do |job| + kwargs = {} + kwargs[:timeout] = vars[:execution_ttl].to_i.minutes if vars[:execution_ttl].present? + + workflow.create_job({}, extra_vars, playbook_vars, vars[:hosts], credentials, kwargs).tap do |job| job.signal(:start) end end diff --git a/app/models/service_ansible_playbook.rb b/app/models/service_ansible_playbook.rb index e7de5acf2e06..5c3f310e511d 100644 --- a/app/models/service_ansible_playbook.rb +++ b/app/models/service_ansible_playbook.rb @@ -85,6 +85,7 @@ def get_job_options(action) CONFIG_OPTIONS_WHITELIST = %i[ cloud_credential_id credential_id + execution_ttl extra_vars hosts network_credential_id