Skip to content

Commit

Permalink
Add option for default ee from org export (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan authored Apr 8, 2023
1 parent 04a2b58 commit d89cbe9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
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

0 comments on commit d89cbe9

Please sign in to comment.