Skip to content

Use Provider specific Service Templates if available#9869

Merged
Fryguy merged 1 commit intoManageIQ:masterfrom
agrare:prefer_provider_specific_service_templates_if_available
Mar 20, 2026
Merged

Use Provider specific Service Templates if available#9869
Fryguy merged 1 commit intoManageIQ:masterfrom
agrare:prefer_provider_specific_service_templates_if_available

Conversation

@agrare
Copy link
Copy Markdown
Member

@agrare agrare commented Feb 26, 2026

If a provider has a specific service template type use that before falling back on the generic ::ServiceTemplate

This allows for some of the specific features like seeing Plays and Stdout from AWX/AnsiblePlaybook services in the UI

Depends on:

Awx Service provisioned with workflows provision.asl:
image

Embedded Terraform Service provisioned with workflows:
image

Embedded Ansible Service provisioned with workflows:
image

ManageIQ/manageiq#23775

@agrare agrare requested a review from a team as a code owner February 26, 2026 21:30
common_st_record_vars(st)
add_orchestration_template_vars(st) if st.kind_of?(ServiceTemplateOrchestration)
add_configuration_script_vars(st) if st.kind_of?(ServiceTemplateAnsibleTower) || st.kind_of?(ServiceTemplateAwx) || st.kind_of?(ServiceTemplateTerraformEnterprise)
add_configuration_script_vars(st) if (st.kind_of?(ServiceTemplateAnsibleTower) || st.kind_of?(ServiceTemplateAwx) || st.kind_of?(ServiceTemplateTerraformEnterprise)) && @edit[:new][:st_prov_type]&.starts_with?("generic_")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was gross already, now just worse. Need to fix this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE this is only for the "deprecated" types, this will go away entirely in the new model

@miq-bot miq-bot added the wip label Feb 26, 2026
@additional_tenants = @edit[:new][:tenant_ids].map(&:to_s) # Get ids of selected Additional Tenants in the Tenants tree
available_orchestration_templates if @record.kind_of?(ServiceTemplateOrchestration)
available_automation_managers if @record.kind_of?(ServiceTemplateAnsibleTower) || @record.kind_of?(ServiceTemplateAwx) || @record.kind_of?(ServiceTemplateTerraformEnterprise)
available_automation_managers if (st.kind_of?(ServiceTemplateAnsibleTower) || st.kind_of?(ServiceTemplateAwx) || st.kind_of?(ServiceTemplateTerraformEnterprise)) && @edit[:new][:st_prov_type]&.starts_with?("generic_")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@agrare agrare force-pushed the prefer_provider_specific_service_templates_if_available branch 2 times, most recently from d8b9d6d to 7a41f11 Compare March 4, 2026 15:21
@agrare
Copy link
Copy Markdown
Member Author

agrare commented Mar 4, 2026

@miq-bot cross-repo-test ManageIQ/manageiq#23741

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Mar 4, 2026
@agrare agrare force-pushed the prefer_provider_specific_service_templates_if_available branch 2 times, most recently from 619614a to 2f84672 Compare March 19, 2026 14:37
If a provider has a specific service template type use that before
falling back on the generic `::ServiceTemplate`
@agrare agrare force-pushed the prefer_provider_specific_service_templates_if_available branch from 2f84672 to 47f30d6 Compare March 19, 2026 17:19
@miq-bot
Copy link
Copy Markdown
Member

miq-bot commented Mar 19, 2026

Checked commit agrare@47f30d6 with ruby 3.3.10, rubocop 1.56.3, haml-lint 0.72.0, and yamllint 1.37.1
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@agrare agrare changed the title [WIP] Use Provider specific Service Templates if available Use Provider specific Service Templates if available Mar 20, 2026
@miq-bot miq-bot removed the wip label Mar 20, 2026
@Fryguy Fryguy merged commit 9b719a5 into ManageIQ:master Mar 20, 2026
11 checks passed
@Fryguy Fryguy self-assigned this Mar 20, 2026
@agrare agrare deleted the prefer_provider_specific_service_templates_if_available branch March 20, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants