-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcontroller_cac.yml
34 lines (31 loc) · 1.28 KB
/
controller_cac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- name: AAP2 Controller configuration via Config as Code
hosts: "{{ HOSTS | default('control[0]') }}"
connection: local
vars:
controller_infra_workloads:
- infra.controller_configuration.projects
- infra.controller_configuration.project_update
- infra.controller_configuration.execution_environments
- infra.controller_configuration.inventories
- infra.controller_configuration.inventory_sources
- infra.controller_configuration.job_templates
- infra.controller_configuration.workflow_job_templates
controller_hostname: "{{ lookup('env', 'TOWER_HOST') }}"
controller_validate_certs: false
controller_configuration_projects_async_retries: 60
controller_configuration_projects_async_delay: 5
tasks:
- name: Gather EC2 metadata facts
amazon.aws.ec2_metadata_facts:
- name: Set vars from EC2 metadata
ansible.builtin.set_fact:
workshop_ec2_region: "{{ ansible_ec2_instance_identity_document_region }}"
- name: Configure controller from project group_vars
ansible.builtin.include_tasks: controller_cac_subtasks_init.yml
loop: "{{ controller_infra_workloads }}"
loop_control:
loop_var: controller_infra_vars
when:
- controller_infra_workloads | d("") | length >0
...