diff --git a/roles/dispatch/defaults/main.yml b/roles/dispatch/defaults/main.yml index 1b1bfc22e..f3e0a8aa2 100644 --- a/roles/dispatch/defaults/main.yml +++ b/roles/dispatch/defaults/main.yml @@ -16,6 +16,7 @@ controller_configuration_dispatcher_roles: - {role: inventory_sources, var: controller_inventory_sources, tags: inventory_sources} - {role: inventory_source_update, var: controller_inventory_sources, tags: inventory_sources} - {role: execution_environments, var: controller_execution_environments, tags: execution_environments} + - {role: organizations, var: controller_organizations, tags: organizations, assign_galaxy_credentials_to_org: true, assign_default_ee_to_org: true} - {role: applications, var: controller_applications, tags: applications} - {role: hosts, var: controller_hosts, tags: hosts} - {role: bulk_host_create, var: controller_bulk_hosts, tags: bulk_hosts} diff --git a/roles/dispatch/meta/argument_specs.yml b/roles/dispatch/meta/argument_specs.yml index ade0c93f7..23bad66be 100644 --- a/roles/dispatch/meta/argument_specs.yml +++ b/roles/dispatch/meta/argument_specs.yml @@ -6,6 +6,8 @@ argument_specs: controller_configuration_dispatcher_roles: default: - {role: settings, var: controller_settings, tags: settings} + - {role: instances, var: controller_instances, tags: instances} + - {role: instance_groups, var: controller_instance_groups, tags: instance_groups} - {role: organizations, var: controller_organizations, tags: organizations} - {role: labels, var: controller_labels, tags: labels} - {role: users, var: controller_user_accounts, tags: users} @@ -19,16 +21,17 @@ argument_specs: - {role: inventory_sources, var: controller_inventory_sources, tags: inventory_sources} - {role: inventory_source_update, var: controller_inventory_sources, tags: inventory_sources} - {role: execution_environments, var: controller_execution_environments, tags: execution_environments} + - {role: organizations, var: controller_organizations, tags: organizations, assign_galaxy_credentials_to_org: true, assign_default_ee_to_org: true} - {role: applications, var: controller_applications, tags: applications} - - {role: instances, var: controller_instances, tags: instances} - - {role: instance_groups, var: controller_instance_groups, tags: instance_groups} - - {role: project_update, var: controller_projects, tags: projects} - {role: hosts, var: controller_hosts, tags: hosts} + - {role: bulk_host_create, var: controller_bulk_hosts, tags: bulk_hosts} - {role: groups, var: controller_groups, tags: inventories} - {role: job_templates, var: controller_templates, tags: job_templates} - {role: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} - {role: schedules, var: controller_schedules, tags: schedules} - {role: roles, var: controller_roles, tags: roles} + - {role: job_launch, var: controller_launch_jobs, tags: job_launch} + - {role: workflow_launch, var: controller_workflow_launch_jobs, tags: workflow_launch} required: false description: List of roles, variables and tags to run through type: list @@ -45,6 +48,14 @@ argument_specs: tags: required: false description: Tags to be applied to the role so tagging can be used to run only part of a playbook + assign_galaxy_credentials_to_org: + required: false + description: Variable to be applied. Whether to assign the galaxy credential to the organizations. Only relevant against the organizations role. + default: false + assign_default_ee_to_org: + required: false + description: Variable to be applied. Whether to assign the default execution environment to the organizations. Only relevant against the organizations role. + default: false # Async variables diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index ea8330cb7..0a0273087 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -10,14 +10,6 @@ loop_control: loop_var: __role vars: - assign_galaxy_credentials_to_org: false - assign_default_ee_to_org: false - -- name: Include Tasks to add Galaxy credentials and Execution Environments to Organizations - ansible.builtin.include_role: - name: organizations - apply: - tags: - - organizations - tags: organizations + assign_galaxy_credentials_to_org: "{{ __role.assign_galaxy_credentials_to_org | default(false) }}" + assign_default_ee_to_org: "{{ __role.assign_default_ee_to_org | default(false) }}" ...