main.yml.j2
This is the main.yml template to replace the original main.yml in the repository.
It will add some extra features to the main.yml:
- create the variables needed for eda configuration
- stop running rulebooks for this organization, prior to configuration
---
- name: Configure rhaap platform controller and eda for the organization
hosts: "{{ instance | default('localhost') }}"
connection: local
gather_facts: false
pre_tasks:
- name: Set the vars
ansible.builtin.set_fact:
aap_configuration_secure_logging: false
controller_credentials: >
{{ controller_credentials_all |
community.general.lists_mergeby(vars['controller_credentials_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_hosts: >
{{ controller_hosts_all |
community.general.lists_mergeby(vars['controller_hosts_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_inventory_sources: >
{{ controller_inventory_sources_all |
community.general.lists_mergeby(vars['controller_inventory_sources_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_inventories: >
{{ controller_inventories_all |
community.general.lists_mergeby(vars['controller_inventories_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_labels: >
{{ controller_labels_all |
community.general.lists_mergeby(vars['controller_labels_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_notifications: >
{{ controller_notifications_all |
community.general.lists_mergeby(vars['controller_notifications_' + branch_name],
'name', recursive=true, list_merge='append') }}
aap_organizations: >
{{ aap_organizations_all |
community.general.lists_mergeby(vars['aap_organizations_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_projects: >
{{ controller_projects_all |
community.general.lists_mergeby(vars['controller_projects_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_schedules: >
{{ controller_schedules_all |
community.general.lists_mergeby(vars['controller_schedules_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_templates: >
{{ controller_templates_all |
community.general.lists_mergeby(vars['controller_templates_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_roles: >
{{ controller_roles_all |
community.general.lists_mergeby(vars['controller_roles_' + branch_name],
'name', recursive=true, list_merge='append') }}
controller_workflows: >
{{ controller_workflows_all |
community.general.lists_mergeby(vars['controller_workflows_' + branch_name],
'name', recursive=true, list_merge='append') }}
eda_controller_tokens: >
{{ eda_controller_tokens_all |
community.general.lists_mergeby(vars['eda_controller_tokens_' + branch_name],
'name', recursive=true, list_merge='append') }}
eda_credentials: >
{{ eda_credentials_all |
community.general.lists_mergeby(vars['eda_credentials_' + branch_name],
'name', recursive=true, list_merge='append') }}
eda_decision_environments: >
{{ eda_decision_environments_all |
community.general.lists_mergeby(vars['eda_decision_environments_' + branch_name],
'name', recursive=true, list_merge='append') }}
eda_event_streams: >
{{ eda_event_streams_all |
community.general.lists_mergeby(vars['eda_event_streams_' + branch_name],
'name', recursive=true, list_merge='append') }}
eda_projects: >
{{ eda_projects_all |
community.general.lists_mergeby(vars['eda_projects_' + branch_name],
'name', recursive=true, list_merge='append') }}
eda_rulebook_activations: >
{{ eda_rulebook_activations_all |
community.general.lists_mergeby(vars['eda_rulebook_activations_' + branch_name],
'name', recursive=true, list_merge='append') }}
- name: Do fixups for activation rulebooks if needed
ansible.builtin.include_tasks: stop_running_rulebooks.yml
roles:
- infra.aap_configuration.dispatch