-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathpre_software.yml
More file actions
140 lines (116 loc) · 3.47 KB
/
pre_software.yml
File metadata and controls
140 lines (116 loc) · 3.47 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
- name: Step 003 Pre Software
hosts: localhost
gather_facts: false
become: false
tags:
- step004
- pre_software
tasks:
- name: "Step 003 Pre Software"
ansible.builtin.debug:
msg: "Step 000 Pre Software"
# ----------------------------------------------------------------------
# Pre-Software Workloads as role
# ----------------------------------------------------------------------
- name: Import Pre-software workloads
import_playbook: >-
{{ 'workloads.yml' if pre_software_workloads is mapping else 'noop.yml' }}
vars:
_workload_title_: "Pre Software"
_workloads_: "{{ pre_software_workloads | default([]) }}"
- name: Run host_workloads for pre_software_workloads
any_errors_fatal: true
hosts: all:localhost
gather_facts: false
tags:
- step004
- pre_software
tasks:
- name: Include host_workloads for pre_software
when:
- pre_software_workloads is iterable
- pre_software_workloads is not mapping
- pre_software_workloads is not string
vars:
agnosticd_stage: pre_software
host_workloads: "{{ pre_software_workloads }}"
ansible.builtin.include_role:
name: host_workloads
- name: Create local ssh keys
hosts: localhost
gather_facts: false
become: false
tags:
- step004
- pre_software
tasks:
- name: Set local ssh key
when: agd_set_env_authorized_key | default(true) | bool
ansible.builtin.import_role:
name: create_ssh_provision_key
- name: Configure all hosts with Repositories, and Common Files
hosts: all:!windows:!rhelai:!isolated
become: true
gather_facts: false
tags:
- step004
- common_tasks
tasks:
- name: Setup Repositories
when: repo_method is defined
ansible.builtin.import_role:
name: set-repositories
- name: Install common packages from common_packages list
when: agd_install_common | default(true) | bool
ansible.builtin.import_role:
name: common
- name: Configure all hosts with ssh environment key
hosts: all:!windows
become: true
gather_facts: false
tags:
- step004
- ssh_env_key
tasks:
- name: Setup the authorized ssh key
when: set_env_authorized_key | default(true) | bool
ansible.builtin.import_role:
name: set_env_authorized_key
- name: Configuring Bastion Hosts
hosts: bastions
become: true
tags:
- step004
- bastion_tasks
tasks:
- name: Install basic bastion configuration
when: agd_install_bastion_base | default(true) | bool
ansible.builtin.import_role:
name: bastion-base
- name: Install basic bastion configuration
when: agd_install_student_user | default(true) | bool
ansible.builtin.import_role:
name: bastion-student-user
- name: Install control student user configuration
when: agd_user_create_ansible_service_account | default(true) | bool
ansible.builtin.include_role:
name: user-create-ansible-service-account
- name: Inject assets onto host(s)
when:
- asset_injector_assets is defined
- asset_injector_assets | length > 0
ansible.builtin.include_role:
name: asset_injector
- name: PreSoftware flight-check
hosts: localhost
connection: local
gather_facts: false
become: false
tags:
- flight_check
tasks:
- name: "Pre-Software checks completed successfully"
ansible.builtin.debug:
msg: "Pre-Software checks completed successfully"
...