workaround.yml

In this file I copied the dispacher_roles variable contents, this gives me the oportunity to play with the order and the number of roles that is executed at any time.
You read the user_role_assignments.yml file that it is invalid?

In here is part of the trick to fix it.

First part is that I split the original variable in 2 parts, see below:

gateway_configuration_dispatcher_roles1:
  - role: gateway_authenticators
    var: gateway_authenticators
    tags: authenticators
  - role: gateway_authenticator_maps
    var: gateway_authenticator_maps
    tags: authenticator_maps
  - role: gateway_settings
    var: gateway_settings
    tags: settings
  - role: gateway_organizations
    var: aap_organizations
    tags: organizations
  - role: gateway_applications
    var: aap_applications
    tags: applications
  - role: gateway_http_ports
    var: http_ports_list
    tags: http_ports
  - role: gateway_service_clusters
    var: gateway_service_clusters
    tags: service_clusters
  - role: gateway_service_keys
    var: gateway_service_keys
    tags: service_keys
  - role: gateway_service_nodes
    var: gateway_service_nodes
    tags: service_nodes
  - role: gateway_services
    var: gateway_services
    tags: services
  - role: gateway_teams
    var: aap_teams
    tags: teams
  - role: gateway_users
    var: aap_user_accounts
    tags: users

gateway_configuration_dispatcher_roles2:
  - role: gateway_role_user_assignments
    var: gateway_role_user_assignments
    tags: role_user_assignments
  - role: gateway_routes
    var: gateway_routes
    tags: routes

hub_configuration_dispatcher_roles:
  - role: hub_group_roles
    var: hub_group_roles
    tags: roles
  - role: hub_namespace
    var: hub_namespaces
    tags: namespaces
  - role: hub_collection
    var: hub_collections
    tags: collections
  - role: hub_ee_registry
    var: hub_ee_registries
    tags: registries
  - role: hub_ee_repository
    var: hub_ee_repositories
    tags: repos
  - role: hub_ee_repository_sync
    var: hub_ee_repository_sync
    tags: reposync
  - role: hub_ee_image
    var: hub_ee_images
    tags: images
  - role: hub_ee_registry
    var: hub_ee_registries
    tags: registry
  - role: hub_ee_registry_index
    var: hub_ee_registries
    tags: ee_indices
  - role: hub_ee_registry_sync
    var: hub_ee_registries
    tags: regsync
  - role: hub_collection_remote
    var: hub_collection_remotes
    tags: collectionremote
  - role: hub_collection_repository
    var: hub_collection_repositories
    tags: collectionsrep
  - role: hub_collection_repository_sync
    var: hub_collection_repositories
    tags: collectionsrepsync

controller_configuration_dispatcher_roles:
  - role: controller_settings
    var: controller_settings
    tags: settings
  - role: controller_instances
    var: controller_instances
    tags: instances
  - role: controller_instance_groups
    var: controller_instance_groups
    tags: instance_groups
  - role: controller_labels
    var: controller_labels
    tags: labels
  - role: controller_credential_types
    var: controller_credential_types
    tags: credential_types
  - role: controller_credentials
    var: controller_credentials
    tags: credentials
  - role: controller_credential_input_sources
    var: controller_credential_input_sources
    tags: credential_input_sources
  - role: controller_execution_environments
    var: controller_execution_environments
    tags: execution_environments
  - role: controller_applications
    var: aap_applications
    tags: applications
  - role: controller_notification_templates
    var: controller_notifications
    tags: notification_templates
  - role: gateway_organizations
    var: aap_organizations
    tags: organizations
    assign_galaxy_credentials_to_org: true
    assign_default_ee_to_org: true
    assign_notification_templates_to_org: true
  - role: controller_projects
    var: controller_projects
    tags:
      - inventories
      - projects
  - role: controller_inventories
    var: controller_inventories
    tags: inventories
  - role: controller_inventory_sources
    var: controller_inventory_sources
    tags:
      - inventories
      - inventory_sources
  - role: controller_inventory_source_update
    var: controller_inventory_sources
    tags:
      - inventories
      - inventory_sources
  - role: controller_hosts
    var: controller_hosts
    tags:
      - inventories
      - hosts
  - role: controller_bulk_host_create
    var: controller_bulk_hosts
    tags:
      - inventories
      - bulk_hosts
  - role: controller_host_groups
    var: controller_groups
    tags:
      - inventories
      - host_groups
  - role: controller_job_templates
    var: controller_templates
    tags: job_templates
  - role: controller_workflow_job_templates
    var: controller_workflows
    tags: workflow_job_templates
  - role: controller_schedules
    var: controller_schedules
    tags: schedules
  - role: controller_roles
    var: controller_roles
    tags: roles
  - role: controller_job_launch
    var: controller_launch_jobs
    tags: job_launch
  - role: controller_workflow_launch
    var: controller_workflow_launch_jobs
    tags: workflow_launch

eda_configuration_dispatcher_roles:
  - role: eda_credential_types
    var: eda_credential_types
    tags: credential_type
  - role: eda_credentials
    var: eda_credentials
    tags: credential
  - role: eda_controller_tokens
    var: eda_controller_tokens
    tags: controller_token
  - role: eda_projects
    var: eda_projects
    tags: project
  - role: eda_event_streams
    var: eda_event_streams
    tags: event_stream
  - role: eda_decision_environments
    var: eda_decision_environments
    tags: decision_environment
  - role: eda_rulebook_activations
    var: eda_rulebook_activations
    tags: rulebook_activation

aap_configuration_dispatcher_roles_1: >
  {{ gateway_configuration_dispatcher_roles1 }}

aap_configuration_dispatcher_roles_2: >
  {{ gateway_configuration_dispatcher_roles2
   + hub_configuration_dispatcher_roles
   + controller_configuration_dispatcher_roles
   + eda_configuration_dispatcher_roles }}
...

Now we have 2 aap_configuration_dispacher_roles variables that we can call.
We need this in our main playbook that starts the real configuration.

Back