forked from mgmt-sa-tiger-team/skylight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision.yml
125 lines (115 loc) · 3.09 KB
/
provision.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
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
---
- name: Provision Instances
hosts: localhost
gather_facts: False
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- manage-instances
vars:
teardown: false
tasks:
- include_role:
name: "check_setup"
- include_role:
name: "manage-{{ instance_loc }}-instances"
- name: Configure Active Directory Domain Controller
hosts: windows_domain_controllers
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- windows-ad-controller
roles:
- windows-ad-controller
- name: Configure Windows Servers
hosts: windows
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- windows_hosts
roles:
- windows-common
- name: Configure GitLab Host
hosts: gitlab
become: True
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- gitlab
roles:
- { role: linux-common }
- { role: geerlingguy.gitlab }
# Run post-config separate to avoid handler restart issue...
- name: Gitlab Post Config
hosts: gitlab
become: True
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- gitlab
roles:
- { role: gitlab-postconfig }
- name: Configure Ansible Host
hosts: tower
become: True
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- ansible-tower
roles:
- linux-common
- ansible-tower
- name: Configure Windows Workstation
hosts: windows_workstations
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- windows-workstation
roles:
- windows-common
- windows-workstation
- name: Configure Docs Host
hosts: docs
become: True
gather_facts: True
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- docs
roles:
- linux-common
- { role: geerlingguy.repo-epel, when: (public_dns_zone is defined and nginx_ssl | bool) }
- { role: geerlingguy.certbot, when: (public_dns_zone is defined and nginx_ssl | bool) }
- { role: docs_nginx_ssl, when: (public_dns_zone is defined and nginx_ssl | bool) }
- { role: docs_nginx, when: (public_dns_zone is undefined or not nginx_ssl | bool) }
- docs_setup
- name: Display Login Information
hosts: localhost
gather_facts: False
vars_files:
- [ 'vars/custom.yml', 'vars/main.yml' ]
tags:
- docs-info
tasks:
- name: Login Information
debug:
msg:
- Student Login - http://{{ name_prefix }}.{{ public_dns_zone }}/users/
- Lab Slide Deck - http://{{ name_prefix }}.{{ public_dns_zone }}/decks/
when: public_dns_zone is defined
- name: Login Information
debug:
msg:
- Student Login - http://{{ hostvars['docs'].ansible_host }}/users/
- Lab Slide Deck - http://{{ hostvars['docs'].ansible_host }}/decks/
when: public_dns_zone is undefined
- name: Build workshop information
template:
src: "{{ playbook_dir }}/roles/docs_setup/templates/workshop.txt.j2"
dest: "{{ playbook_dir }}/workshops/{{ name_prefix }}/workshop.txt"