Handlers: move all handlers into their roles, again
This commit is contained in:
parent
2fbaea9e37
commit
886cdb2417
22 changed files with 159 additions and 90 deletions
|
@ -3,7 +3,6 @@
|
||||||
- hosts: ffmwu-gateways
|
- hosts: ffmwu-gateways
|
||||||
remote_user: admin
|
remote_user: admin
|
||||||
roles:
|
roles:
|
||||||
- handlers
|
|
||||||
- prerequisites
|
- prerequisites
|
||||||
- server-apt-repos
|
- server-apt-repos
|
||||||
- server-basic
|
- server-basic
|
||||||
|
|
|
@ -1,89 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload systemd
|
|
||||||
systemd:
|
|
||||||
daemon_reload: yes
|
|
||||||
|
|
||||||
- name: reload network interfaces
|
|
||||||
systemd:
|
|
||||||
name: networking
|
|
||||||
state: reloaded
|
|
||||||
|
|
||||||
- name: activate sysfs variables
|
|
||||||
systemd:
|
|
||||||
name: sysfsutils
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: restart bind9
|
|
||||||
systemd:
|
|
||||||
name: bind9
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: reload systemd unit bird
|
|
||||||
systemd:
|
|
||||||
name: bird
|
|
||||||
state: reloaded
|
|
||||||
|
|
||||||
- name: reload systemd unit bird6
|
|
||||||
systemd:
|
|
||||||
name: bird6
|
|
||||||
state: reloaded
|
|
||||||
|
|
||||||
- name: restart fastd intragate instances
|
|
||||||
systemd:
|
|
||||||
name: "fastd@{{ item.0.id }}igvpn-{{ item.1.mtu }}"
|
|
||||||
state: restarted
|
|
||||||
with_subelements:
|
|
||||||
- "{{ meshes }}"
|
|
||||||
- fastd.intragate.instances
|
|
||||||
|
|
||||||
- name: restart fastd mesh instances
|
|
||||||
systemd:
|
|
||||||
name: "fastd@{{ item.0.id }}vpn-{{ item.1.mtu }}"
|
|
||||||
state: restarted
|
|
||||||
with_subelements:
|
|
||||||
- "{{ meshes }}"
|
|
||||||
- fastd.nodes.instances
|
|
||||||
|
|
||||||
- name: restart systemd unit radvd
|
|
||||||
systemd:
|
|
||||||
name: radvd
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: restart respondd
|
|
||||||
systemd:
|
|
||||||
name: "respondd-{{ item.id }}"
|
|
||||||
state: restarted
|
|
||||||
with_items: "{{ meshes }}"
|
|
||||||
|
|
||||||
- name: restart systemd unit tinc
|
|
||||||
systemd:
|
|
||||||
name: "tinc@{{ icvpn.interface }}"
|
|
||||||
enabled: yes
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: restart systemd unit ffmwu-static-routes
|
|
||||||
systemd:
|
|
||||||
name: ffmwu-static-routes
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: restart systemd unit ffmwu-ip-rules
|
|
||||||
systemd:
|
|
||||||
name: ffmwu-ip-rules
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: restart respondd
|
|
||||||
systemd:
|
|
||||||
name: "respondd-{{ item.id }}"
|
|
||||||
state: restarted
|
|
||||||
with_items: "{{ meshes }}"
|
|
||||||
|
|
||||||
- name: iptables-restore
|
|
||||||
shell: iptables-restore < /etc/iptables/rules.v4
|
|
||||||
|
|
||||||
- name: ip6tables-restore
|
|
||||||
shell: ip6tables-restore < /etc/iptables/rules.v6
|
|
||||||
|
|
||||||
- name: reload nginx
|
|
||||||
systemd:
|
|
||||||
name: nginx
|
|
||||||
state: reloaded
|
|
5
roles/network-batman/handlers/main.yml
Normal file
5
roles/network-batman/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reload network interfaces
|
||||||
|
systemd:
|
||||||
|
name: networking
|
||||||
|
state: reloaded
|
5
roles/network-fastd/handlers/main.yml
Normal file
5
roles/network-fastd/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reload network interfaces
|
||||||
|
systemd:
|
||||||
|
name: networking
|
||||||
|
state: reloaded
|
5
roles/network-ffrl/handlers/main.yml
Normal file
5
roles/network-ffrl/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reload network interfaces
|
||||||
|
systemd:
|
||||||
|
name: networking
|
||||||
|
state: reloaded
|
6
roles/network-iptables-gateway/handlers/main.yml
Normal file
6
roles/network-iptables-gateway/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: iptables-restore
|
||||||
|
shell: iptables-restore < /etc/iptables/rules.v4
|
||||||
|
|
||||||
|
- name: ip6tables-restore
|
||||||
|
shell: ip6tables-restore < /etc/iptables/rules.v6
|
10
roles/network-meshbridge/handlers/main.yml
Normal file
10
roles/network-meshbridge/handlers/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: reload network interfaces
|
||||||
|
systemd:
|
||||||
|
name: networking
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
|
- name: activate sysfs variables
|
||||||
|
systemd:
|
||||||
|
name: sysfsutils
|
||||||
|
state: restarted
|
14
roles/network-routing/handlers/main.yml
Normal file
14
roles/network-routing/handlers/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: restart systemd unit ffmwu-static-routes
|
||||||
|
systemd:
|
||||||
|
name: ffmwu-static-routes
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- name: restart systemd unit ffmwu-ip-rules
|
||||||
|
systemd:
|
||||||
|
name: ffmwu-ip-rules
|
||||||
|
state: restarted
|
4
roles/server-basic/handlers/main.yml
Normal file
4
roles/server-basic/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
9
roles/service-bind-slave/handlers/main.yml
Normal file
9
roles/service-bind-slave/handlers/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: restart bind9
|
||||||
|
systemd:
|
||||||
|
name: bind9
|
||||||
|
state: restarted
|
10
roles/service-bird-ffrl/handlers/main.yml
Normal file
10
roles/service-bird-ffrl/handlers/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd unit bird
|
||||||
|
systemd:
|
||||||
|
name: bird
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
|
- name: reload systemd unit bird6
|
||||||
|
systemd:
|
||||||
|
name: bird6
|
||||||
|
state: reloaded
|
14
roles/service-bird-icvpn/handlers/main.yml
Normal file
14
roles/service-bird-icvpn/handlers/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: reload systemd unit bird
|
||||||
|
systemd:
|
||||||
|
name: bird
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
|
- name: reload systemd unit bird6
|
||||||
|
systemd:
|
||||||
|
name: bird6
|
||||||
|
state: reloaded
|
10
roles/service-bird/handlers/main.yml
Normal file
10
roles/service-bird/handlers/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd unit bird
|
||||||
|
systemd:
|
||||||
|
name: bird
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
|
- name: reload systemd unit bird6
|
||||||
|
systemd:
|
||||||
|
name: bird6
|
||||||
|
state: reloaded
|
|
@ -1,4 +1,8 @@
|
||||||
---
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: restart kea-dhcp4-server
|
- name: restart kea-dhcp4-server
|
||||||
systemd:
|
systemd:
|
||||||
name: kea-dhcp4-server
|
name: kea-dhcp4-server
|
||||||
|
|
8
roles/service-fastd-intragate/handlers/main.yml
Normal file
8
roles/service-fastd-intragate/handlers/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- name: restart fastd intragate instances
|
||||||
|
systemd:
|
||||||
|
name: "fastd@{{ item.0.id }}igvpn-{{ item.1.mtu }}"
|
||||||
|
state: restarted
|
||||||
|
with_subelements:
|
||||||
|
- "{{ meshes }}"
|
||||||
|
- fastd.intragate.instances
|
12
roles/service-fastd-mesh/handlers/main.yml
Normal file
12
roles/service-fastd-mesh/handlers/main.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: restart fastd mesh instances
|
||||||
|
systemd:
|
||||||
|
name: "fastd@{{ item.0.id }}vpn-{{ item.1.mtu }}"
|
||||||
|
state: restarted
|
||||||
|
with_subelements:
|
||||||
|
- "{{ meshes }}"
|
||||||
|
- fastd.nodes.instances
|
4
roles/service-fastd/handlers/main.yml
Normal file
4
roles/service-fastd/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
9
roles/service-nginx-firmware/handlers/main.yml
Normal file
9
roles/service-nginx-firmware/handlers/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: reload nginx
|
||||||
|
systemd:
|
||||||
|
name: nginx
|
||||||
|
state: reloaded
|
5
roles/service-nginx/handlers/main.yml
Normal file
5
roles/service-nginx/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reload nginx
|
||||||
|
systemd:
|
||||||
|
name: nginx
|
||||||
|
state: reloaded
|
5
roles/service-radvd/handlers/main.yml
Normal file
5
roles/service-radvd/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: restart systemd unit radvd
|
||||||
|
systemd:
|
||||||
|
name: radvd
|
||||||
|
state: restarted
|
10
roles/service-respondd/handlers/main.yml
Normal file
10
roles/service-respondd/handlers/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: restart respondd
|
||||||
|
systemd:
|
||||||
|
name: "respondd-{{ item.id }}"
|
||||||
|
state: restarted
|
||||||
|
with_items: "{{ meshes }}"
|
10
roles/service-tinc/handlers/main.yml
Normal file
10
roles/service-tinc/handlers/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: restart systemd unit tinc
|
||||||
|
systemd:
|
||||||
|
name: "tinc@{{ icvpn.interface }}"
|
||||||
|
enabled: yes
|
||||||
|
state: restarted
|
Loading…
Reference in a new issue