-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdeploy-obs.yml
87 lines (85 loc) · 1.84 KB
/
deploy-obs.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
---
- hosts: obs
gather_facts: no
vars:
ansible_python_interpreter: /usr/bin/python3
pre_tasks:
- name: "{{ env }} - Cloud members are running"
local_action:
module: vultr_server
name: "{{ inventory_hostname_short }}"
os: "Debian 10 x64 (buster)"
private_network_enabled: yes
plan: "{{ plan }}"
ssh_keys:
- marek
- github
firewall_group: "{{ firewall_grp }}"
region: "{{ region }}"
state: present
- hosts: obs
gather_facts: yes
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- name: Install nginx with rtmp
block:
- apt:
name:
- nginx
- libnginx-mod-rtmp
state: present
tags:
- nginx
roles:
- role: core
tags:
- core
- base
- role: users
tags:
- users
- base
- role: prometheus
tags:
- prometheus
- role: node_exporter
tags:
- prometheus
- role: docker-ce
tags:
- docker
# - role: nginx
# tags:
# - nginx
- name: Configure DNS
hosts: localhost
tasks:
- name: "{{ env }} - Register public domains"
cloudflare_dns:
zone: "fejk.net"
record: "{{ item }}"
type: A
proxied: no
value: "{{ hostvars[item].v4_main_ip }}"
state: present
solo: true
account_email: "{{ cloudflare_account_email }}"
account_api_token: "{{ cloudflare_account_api_token }}"
with_items: "{{ groups['all'] }}"
tags:
- dns
- name: "{{ env }} - Register play.kurzy-online.eu"
cloudflare_dns:
zone: "kurzy-online.eu"
record: "play.kurzy-online.eu"
type: A
proxied: yes
value: "{{ hostvars[item].v4_main_ip }}"
account_email: "{{ cloudflare_account_email }}"
account_api_token: "{{ cloudflare_account_api_token }}"
with_items:
- obs1
tags:
- app_dns
- dns