|
1 | 1 | --- |
2 | | -- hosts: hashiworker,hashimirror,hashimx |
3 | | - become: yes |
| 2 | +- name: Common Hashiorp Worker Services |
| 3 | + hosts: hashiworker,hashimirror,hashimx |
| 4 | + become: true |
4 | 5 | become_user: root |
5 | | - become_method: sudo |
| 6 | + become_method: ansible.builtin.sudo |
6 | 7 | vars: |
7 | 8 | nomad_role: client |
8 | 9 | roles: |
9 | 10 | - consul |
10 | 11 | - nomad-client |
11 | 12 |
|
12 | | - |
13 | | -- hosts: hashimirror |
14 | | - become: yes |
| 13 | +- name: Nomad-based Mirrors |
| 14 | + hosts: hashimirror |
| 15 | + become: true |
15 | 16 | become_user: root |
16 | | - become_method: sudo |
| 17 | + become_method: ansible.builtin.sudo |
17 | 18 | tasks: |
18 | 19 | - name: Accept IPv4 Traffic |
19 | | - lineinfile: |
20 | | - line: "{{item}}" |
| 20 | + ansible.builtin.lineinfile: |
| 21 | + line: "{{ item }}" |
21 | 22 | path: /etc/iptables.d/proxy.rules |
22 | | - create: yes |
| 23 | + create: true |
23 | 24 | owner: root |
24 | 25 | group: root |
25 | | - mode: 0640 |
| 26 | + mode: "0640" |
26 | 27 | with_items: |
27 | 28 | - "*filter" |
28 | 29 | - "-A INPUT -p tcp --dport 80 -j ACCEPT" |
29 | 30 | - "-A INPUT -p tcp --dport 443 -j ACCEPT" |
30 | 31 | - "-A INPUT -p tcp --dport 873 -j ACCEPT" |
31 | 32 | - "COMMIT" |
32 | 33 | - name: Accept IPv6 Traffic |
33 | | - lineinfile: |
34 | | - line: "{{item}}" |
| 34 | + ansible.builtin.lineinfile: |
| 35 | + line: "{{ item }}" |
35 | 36 | path: /etc/ip6tables.d/proxy.6rules |
36 | | - create: yes |
| 37 | + create: true |
37 | 38 | owner: root |
38 | 39 | group: root |
39 | | - mode: 0640 |
| 40 | + mode: "0640" |
40 | 41 | with_items: |
41 | 42 | - "*filter" |
42 | 43 | - "-A INPUT -p tcp --dport 80 -j ACCEPT" |
|
46 | 47 |
|
47 | 48 | - name: Special rules for d-hel-fi |
48 | 49 | hosts: d-hel-fi.m.voidlinux.org |
49 | | - become: yes |
| 50 | + become: true |
50 | 51 | become_user: root |
51 | | - become_method: sudo |
| 52 | + become_method: ansible.builtin.sudo |
52 | 53 | tasks: |
53 | 54 | - name: Accept IPv4 Traffic |
54 | | - lineinfile: |
55 | | - line: "{{item}}" |
| 55 | + ansible.builtin.lineinfile: |
| 56 | + line: "{{ item }}" |
56 | 57 | path: /etc/iptables.d/root_mirror.rules |
57 | | - create: yes |
| 58 | + create: true |
58 | 59 | owner: root |
59 | 60 | group: root |
60 | | - mode: 0640 |
| 61 | + mode: "0640" |
61 | 62 | with_items: |
62 | 63 | - "*filter" |
63 | 64 | - "-A INPUT -p tcp --dport 2022 -j ACCEPT" |
64 | 65 | - "-A INPUT -p tcp --dport 8001 -j ACCEPT" |
65 | 66 | - "-A INPUT -p tcp --dport 8003 -j ACCEPT" |
66 | 67 | - "COMMIT" |
67 | 68 | - name: Accept IPv6 Traffic |
68 | | - lineinfile: |
69 | | - line: "{{item}}" |
| 69 | + ansible.builtin.lineinfile: |
| 70 | + line: "{{ item }}" |
70 | 71 | path: /etc/ip6tables.d/root_mirror.6rules |
71 | | - create: yes |
| 72 | + create: true |
72 | 73 | owner: root |
73 | 74 | group: root |
74 | | - mode: 0640 |
| 75 | + mode: "0640" |
75 | 76 | with_items: |
76 | 77 | - "*filter" |
77 | 78 | - "-A INPUT -p tcp --dport 2022 -j ACCEPT" |
78 | 79 | - "-A INPUT -p tcp --dport 8001 -j ACCEPT" |
79 | 80 | - "-A INPUT -p tcp --dport 8003 -j ACCEPT" |
80 | 81 | - "COMMIT" |
81 | 82 |
|
82 | | -- hosts: hashimx |
83 | | - become: yes |
| 83 | +- name: Additional tasks for MX hosts |
| 84 | + hosts: hashimx |
| 85 | + become: true |
84 | 86 | become_user: root |
85 | | - become_method: sudo |
| 87 | + become_method: ansible.builtin.sudo |
86 | 88 | tasks: |
87 | 89 | - name: Accept IPv4 Traffic |
88 | | - lineinfile: |
89 | | - line: "{{item}}" |
| 90 | + ansible.builtin.lineinfile: |
| 91 | + line: "{{ item }}" |
90 | 92 | path: /etc/iptables.d/maddy.rules |
91 | | - create: yes |
| 93 | + create: true |
92 | 94 | owner: root |
93 | 95 | group: root |
94 | | - mode: 0640 |
| 96 | + mode: "0640" |
95 | 97 | with_items: |
96 | 98 | - "*filter" |
97 | 99 | - "-A INPUT -p tcp --dport 25 -j ACCEPT" |
|
101 | 103 | - "-A INPUT -p tcp --dport 993 -j ACCEPT" |
102 | 104 | - "COMMIT" |
103 | 105 | - name: Accept IPv6 Traffic |
104 | | - lineinfile: |
105 | | - line: "{{item}}" |
| 106 | + ansible.builtin.lineinfile: |
| 107 | + line: "{{ item }}" |
106 | 108 | path: /etc/ip6tables.d/maddy.6rules |
107 | | - create: yes |
| 109 | + create: true |
108 | 110 | owner: root |
109 | 111 | group: root |
110 | | - mode: 0640 |
| 112 | + mode: "0640" |
111 | 113 | with_items: |
112 | 114 | - "*filter" |
113 | 115 | - "-A INPUT -p tcp --dport 25 -j ACCEPT" |
|
117 | 119 | - "-A INPUT -p tcp --dport 993 -j ACCEPT" |
118 | 120 | - "COMMIT" |
119 | 121 |
|
120 | | -- hosts: buildworker |
121 | | - become: yes |
| 122 | +- name: Build Servers |
| 123 | + hosts: buildworker |
| 124 | + become: true |
122 | 125 | become_user: root |
123 | | - become_method: sudo |
| 126 | + become_method: ansible.builtin.sudo |
124 | 127 | roles: |
125 | 128 | - buildworker |
0 commit comments