Skip to content
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

Add option for default ee from org export #565

Merged
merged 4 commits into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/filetree_inventory_org.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- Fixed filetree read to error when organization not defined.
...
4 changes: 4 additions & 0 deletions changelogs/fragments/org_ee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
minor_changes:
- added option for using the export form of default execution environment.
...
2 changes: 1 addition & 1 deletion roles/organizations/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
custom_virtualenv: "{{ __controller_organizations_item.custom_virtualenv | default(omit, true) }}"
max_hosts: "{{ __controller_organizations_item.max_hosts | default(omit, true) }}"
instance_groups: "{{ __controller_organizations_item.instance_groups | default(omit, true) }}"
default_environment: "{{ (__controller_organizations_item.default_environment | default(omit)) if (assign_default_ee_to_org is defined and assign_default_ee_to_org) else omit }}"
default_environment: "{{ (__controller_organizations_item.default_environment.name | default(__controller_organizations_item.execution_environment | default(omit))) if (assign_default_ee_to_org is defined and assign_default_ee_to_org) else omit }}"
galaxy_credentials: "{{ (__controller_organizations_item.galaxy_credentials | default(omit)) if (assign_galaxy_credentials_to_org is defined and assign_galaxy_credentials_to_org) else omit }}"
notification_templates_approvals: "{{ __controller_organizations_item.notification_templates_approvals | default(__controller_organizations_item.related.notification_templates_approvals | default([]) | map(attribute='name') | list) | default(omit, true) }}"
notification_templates_started: "{{ __controller_organizations_item.notification_templates_started | default(__controller_organizations_item.related.notification_templates_started | default([]) | map(attribute='name') | list) | default(omit, true) }}"
Expand Down
3 changes: 3 additions & 0 deletions tests/configs_export_model/organizations_export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ controller_organizations:
- name: Default
description: Default
max_hosts: 0
default_environment:
name: My EE
type: execution_environment
custom_virtualenv: null
related:
notification_templates_started: []
Expand Down