forked from validatedpatterns/agof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
80 lines (74 loc) · 2.07 KB
/
main.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
- name: "Prepare AAP Installation"
hosts: aap_controllers:automation_hub:eda_controllers
gather_facts: true
become: true
vars_files:
- '~/agof_vault.yml'
tasks:
- name: "Download AAP"
ansible.builtin.include_role:
name: roles/aap_download
- name: "Configure controller"
hosts: aap_controllers
gather_facts: true
become: true
vars_files:
- '~/agof_vault.yml'
tasks:
- name: "Install AAP"
ansible.builtin.include_role:
name: roles/control_node
vars:
controllerinstall: true
- name: "Configure Automation Hub"
hosts: automation_hub
gather_facts: true
become: true
vars_files:
- '~/agof_vault.yml'
tasks:
- name: "Configure Automation Hub"
ansible.builtin.include_role:
name: roles/private_automation_hub
when:
- automation_hub|bool
- name: "Configure Event Driven Automation Controller"
hosts: eda_controllers
gather_facts: true
become: true
vars_files:
- '~/agof_vault.yml'
tasks:
- name: "Configure EDA Controllers"
ansible.builtin.include_role:
name: roles/eda_controller
when:
- eda|bool
- name: "Mutually trust CA certs"
hosts: aap_controllers:automation_hub:eda_controllers
gather_facts: true
become: true
vars_files:
- '~/agof_vault.yml'
tasks:
- name: "Retrieve CA bundles"
ansible.builtin.slurp:
src: /etc/pki/ca-trust/source/anchors/ansible-automation-platform-managed-ca-cert.crt
register: ca_slurp
when:
- (automation_hub|bool or eda|bool)
- name: "Deploy CA bundles"
ansible.builtin.copy:
content: "{{ hostvars[item].ca_slurp.content | b64decode }}"
dest: "/etc/pki/ca-trust/source/anchors/{{ item }}-ca-bundle.crt"
mode: "0644"
owner: root
group: root
loop: "{{ groups['aap_controllers'] + groups['automation_hub'] }}"
when:
- (automation_hub|bool or eda|bool)
- name: "Update CA trusts"
ansible.builtin.command: /usr/bin/update-ca-trust
when:
- (automation_hub|bool or eda|bool)