diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index 71f7ce3e3..0b1a6f5ef 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -103,6 +103,7 @@ name: infra.controller_configuration.projects vars: controller_projects: "{{ project_difference }}" +... """ RETURN = """ diff --git a/plugins/modules/controller_export_diff.py b/plugins/modules/controller_export_diff.py index b9284743b..9f6db83cc 100644 --- a/plugins/modules/controller_export_diff.py +++ b/plugins/modules/controller_export_diff.py @@ -199,6 +199,7 @@ controller_password: secret123 validate_certs: false register: export_results +... """ import logging diff --git a/roles/organizations/defaults/main.yml b/roles/organizations/defaults/main.yml index 49047d1cd..5538411e8 100644 --- a/roles/organizations/defaults/main.yml +++ b/roles/organizations/defaults/main.yml @@ -9,4 +9,5 @@ controller_configuration_organizations_enforce_defaults: "{{ controller_configur assign_galaxy_credentials_to_org: true assign_default_ee_to_org: true assign_notification_templates_to_org: true +assign_instance_groups_to_org: true ... diff --git a/roles/organizations/tasks/main.yml b/roles/organizations/tasks/main.yml index 9fdc415c5..650af22cb 100644 --- a/roles/organizations/tasks/main.yml +++ b/roles/organizations/tasks/main.yml @@ -5,11 +5,11 @@ new_name: "{{ __controller_organizations_item.new_name | default(omit) }}" description: "{{ __controller_organizations_item.description | default(('' if controller_configuration_organizations_enforce_defaults else omit), true) }}" custom_virtualenv: "{{ __controller_organizations_item.custom_virtualenv | default(omit, true) }}" - max_hosts: "{{ __controller_organizations_item.max_hosts | default(( 0 if controller_configuration_organizations_enforce_defaults else omit), true) }}" - instance_groups: "{{ __controller_organizations_item.instance_groups | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) }}" + max_hosts: "{{ __controller_organizations_item.max_hosts | default((0 if controller_configuration_organizations_enforce_defaults else omit), true) }}" + instance_groups: "{{ (__controller_organizations_item.instance_groups | default(([] if controller_configuration_organizations_enforce_defaults else omit), true)) if (assign_instance_groups_to_org is defined and assign_instance_groups_to_org) else omit }}" default_environment: "{{ (__controller_organizations_item.default_environment.name | default(__controller_organizations_item.default_environment | 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(([] if controller_configuration_organizations_enforce_defaults else omit), true)) if (assign_galaxy_credentials_to_org is defined and assign_galaxy_credentials_to_org) else omit }}" - notification_templates_approvals: "{{ (__controller_organizations_item.related.notification_templates_approvals | map(attribute='name') | list if __controller_organizations_item.related.notification_templates_approvals is defined) | default(__controller_organizations_item.notification_templates_approvals) | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) if (assign_notification_templates_to_org is defined and assign_notification_templates_to_org) else omit }}" + notification_templates_approvals: "{{ (__controller_organizations_item.related.notification_templates_approvals | map(attribute='name') | list if __controller_organizations_item.related.notification_templates_approvals is defined) | default(__controller_organizations_item.notification_templates_approvals) | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) if (assign_notification_templates_to_org is defined and assign_notification_templates_to_org) else omit }}" notification_templates_started: "{{ (__controller_organizations_item.related.notification_templates_started | map(attribute='name') | list if __controller_organizations_item.related.notification_templates_started is defined) | default(__controller_organizations_item.notification_templates_started) | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) if (assign_notification_templates_to_org is defined and assign_notification_templates_to_org) else omit }}" notification_templates_success: "{{ (__controller_organizations_item.related.notification_templates_success | map(attribute='name') | list if __controller_organizations_item.related.notification_templates_success is defined) | default(__controller_organizations_item.notification_templates_success) | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) if (assign_notification_templates_to_org is defined and assign_notification_templates_to_org) else omit }}" notification_templates_error: "{{ (__controller_organizations_item.related.notification_templates_error | map(attribute='name') | list if __controller_organizations_item.related.notification_templates_error is defined) | default(__controller_organizations_item.notification_templates_error) | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) if (assign_notification_templates_to_org is defined and assign_notification_templates_to_org) else omit }}"