-
Notifications
You must be signed in to change notification settings - Fork 5
/
cloudflare-dns.yml
70 lines (68 loc) · 2.11 KB
/
cloudflare-dns.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
---
- hosts: cluster
tasks:
# - debug:
# msg: "{{ env }} - {{ item }} IN A {{ hostvars[item].v4_main_ip }}"
# with_items: "{{ groups['all'] }}"
- name: "{{ env }} - Register mamagement domain"
local_action:
module: cloudflare_dns
zone: "fejk.net"
record: "{{ cluster_fqdn }}"
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['masters'] }}"
- name: "{{ env }} - Register public domains"
local_action:
module: 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['cluster'] }}"
- name: "{{ env }} - Allow all TCP betwean nodes"
local_action:
module: vultr_firewall_rule
group: "{{ env }}_MASTERS"
protocol: tcp
start_port: 1
end_port: 65535
cidr: "{{ hostvars[item].v4_main_ip }}/32"
with_items: "{{ groups['cluster'] }}"
- name: "{{ env }} - Allow all UDP betwean nodes"
local_action:
module: vultr_firewall_rule
group: "{{ env }}_MASTERS"
protocol: udp
start_port: 1
end_port: 65535
cidr: "{{ hostvars[item].v4_main_ip }}/32"
with_items: "{{ groups['cluster'] }}"
- name: "{{ env }} - Allow all TCP betwean nodes"
local_action:
module: vultr_firewall_rule
group: "{{ env }}_NODES"
protocol: tcp
start_port: 1
end_port: 65535
cidr: "{{ hostvars[item].v4_main_ip }}/32"
with_items: "{{ groups['cluster'] }}"
- name: "{{ env }} - Allow all UDP betwean nodes"
local_action:
module: vultr_firewall_rule
group: "{{ env }}_NODES"
protocol: udp
start_port: 1
end_port: 65535
cidr: "{{ hostvars[item].v4_main_ip }}/32"
with_items: "{{ groups['cluster'] }}"