-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.yaml
92 lines (83 loc) · 2.6 KB
/
site.yaml
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
---
# Main site file for all ansible playbooks and things scheduled
# For some reason hvac won't be bundled with ansible via brew, so this commmand fixes it
# "$(brew --cellar ansible)/$(brew info ansible --json=v1 | jq -r '.[].linked_keg')/libexec/bin/pip" install hvac
- name: Add common settings for all servers
hosts: all
become: true
environment:
VAULT_ADDR: https://vault.thesniderpad.com
vars:
vaulted: "{{ lookup('hashi_vault', 'url=https://vault.thesniderpad.com secret=ansible/data/variables')}}" # pragma: allowlist secret
roles:
- common
tags: common
gather_facts: true
- name: Add common settings for all kubernetes servers
hosts: k8s1,k8s2,k8stest
become: true
roles:
- k8s_common
tags: k8s_common
- name: Setup master kubernetes nodes
hosts: k8s1masters,k8s2masters,k8stestmasters
become: true
environment:
VAULT_ADDR: https://vault.thesniderpad.com
vars:
vaulted: "{{ lookup('hashi_vault', 'url=https://vault.thesniderpad.com secret=ansible/data/variables')}}" # pragma: allowlist secret
roles:
- { role: k8s_master_init, when: "masters[0] == inventory_hostname" }
- { role: k8s_master_join, when: "masters[0] != inventory_hostname" }
tags: k8s_masters
- name: Add k8s workers to clusters
hosts: k8s1workers,k8s2workers,k8stestworkers
become: true
roles:
- k8s_worker_join
tags: k8s_workers
# Setup static DNS entries from the inventory.yaml file
- name: Setup static DNS entries for k8s services
hosts: gw
become: true
roles:
- static_dns
tags: static_dns
- name: Install Production Services on K8s Clusters
hosts: k8s1,k8stest
become: true
environment:
VAULT_ADDR: https://vault.thesniderpad.com
vars:
vaulted: "{{ lookup('hashi_vault', 'url=https://vault.thesniderpad.com secret=ansible/data/variables')}}" # pragma: allowlist secret
roles:
- prod_services
- name: Blanc specific playbooks
hosts: blanc
become: true
roles:
- arq
- plex
- blanc
- hosts: grigio
become: true
vars_files:
- site-variables.yaml
environment:
VAULT_ADDR: https://vault.thesniderpad.com
vars:
vaulted: "{{ lookup('hashi_vault', 'url=https://vault.thesniderpad.com secret=ansible/data/variables')}}" # pragma: allowlist secret
roles:
- role: grigio
tags: grigio
- role: vault
tags: vault
- hosts: giro
become: true
environment:
VAULT_ADDR: https://vault.thesniderpad.com
vars:
vaulted: "{{ lookup('hashi_vault', 'url=https://vault.thesniderpad.com secret=ansible/data/variables')}}" # pragma: allowlist secret
roles:
- role: magicmirror2
tags: magicmirror2