diff --git a/app/models/service_template_ansible_playbook.rb b/app/models/service_template_ansible_playbook.rb index 8e843aa248b..fbdd7b4536d 100644 --- a/app/models/service_template_ansible_playbook.rb +++ b/app/models/service_template_ansible_playbook.rb @@ -7,6 +7,11 @@ def self.default_retirement_entry_point '/Service/Generic/StateMachines/GenericLifecycle/retire' end + def job_template(service_action) + item = resource_actions.detect { |ra| ra.action == service_action } + item.configuration_template if item + end + # create ServiceTemplate and supporting ServiceResources and ResourceActions # options # :name diff --git a/lib/miq_automation_engine/service_models/miq_ae_service_service_template_ansible_playbook.rb b/lib/miq_automation_engine/service_models/miq_ae_service_service_template_ansible_playbook.rb index 6197e79dd21..5876eca4d94 100644 --- a/lib/miq_automation_engine/service_models/miq_ae_service_service_template_ansible_playbook.rb +++ b/lib/miq_automation_engine/service_models/miq_ae_service_service_template_ansible_playbook.rb @@ -1,4 +1,5 @@ module MiqAeMethodService class MiqAeServiceServiceTemplateAnsiblePlaybook < MiqAeServiceServiceTemplateGeneric + expose :job_template end end