forked from redhat-cop/agnosticd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre_software.yml
68 lines (54 loc) · 1.49 KB
/
pre_software.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
---
- name: Step 003 Pre Software
hosts: localhost
connection: local
gather_facts: false
become: false
tasks:
- debug:
msg: "Step 003 Pre Software"
- import_role:
name: infra-local-create-ssh_key
when: set_env_authorized_key | bool
# Cloudformation template or equivalent should tag all hosts with Project:{{ env_type }}-{{ guid }}
- name: Configure all hosts with Repositories, Common Files and Set environment key
hosts: all
become: true
gather_facts: false
tags:
- step004
- common_tasks
roles:
- role: set-repositories
when: repo_method is defined
- role: set_env_authorized_key
when: set_env_authorized_key | bool
- name: Configuring Bastion Hosts
hosts: bastions
become: true
tags:
- step004
- bastion_tasks
pre_tasks:
- name: Generate strong password
set_fact:
student_password: "{{ lookup('password', '/dev/null length=12 chars=ascii_letters,digits') }}"
roles:
- role: common
when: install_common | default(true) | bool
- role: bastion
when: install_bastion | default(true) | bool
- role: bastion-student-user
when: install_student_user | default(true) | bool
- role: control-user
when: install_control_user | default(true) | bool
- name: PreSoftware flight-check
hosts: localhost
connection: local
gather_facts: false
become: false
tags:
- flight_check
tasks:
- debug:
msg: "Pre-Software checks completed successfully"