Move all handlers to one single role
This commit is contained in:
parent
f56215f03c
commit
f934a88661
18 changed files with 80 additions and 120 deletions
|
@ -3,6 +3,7 @@
|
||||||
- hosts: ffmwu-gateways
|
- hosts: ffmwu-gateways
|
||||||
remote_user: admin
|
remote_user: admin
|
||||||
roles:
|
roles:
|
||||||
|
- handlers
|
||||||
- prerequisites
|
- prerequisites
|
||||||
- server-repos
|
- server-repos
|
||||||
- server-basic
|
- server-basic
|
||||||
|
|
79
roles/handlers/handlers/main.yml
Normal file
79
roles/handlers/handlers/main.yml
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
---
|
||||||
|
- 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 isc dhcp server
|
||||||
|
systemd:
|
||||||
|
name: isc-dhcp-server
|
||||||
|
enabled: yes
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- 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
|
||||||
|
enabled: yes
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- name: restart systemd unit ffmwu-static-routes
|
||||||
|
systemd:
|
||||||
|
name: ffmwu-static-routes
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- name: iptables-restore
|
||||||
|
shell: iptables-restore < /etc/iptables/rules.v4
|
||||||
|
|
||||||
|
- name: ip6tables-restore
|
||||||
|
shell: ip6tables-restore < /etc/iptables/rules.v6
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload network interfaces
|
|
||||||
systemd:
|
|
||||||
name: networking
|
|
||||||
state: reloaded
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload network interfaces
|
|
||||||
systemd:
|
|
||||||
name: networking
|
|
||||||
state: reloaded
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload network interfaces
|
|
||||||
systemd:
|
|
||||||
name: networking
|
|
||||||
state: reloaded
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: iptables-restore
|
|
||||||
shell: iptables-restore < /etc/iptables/rules.v4
|
|
||||||
|
|
||||||
- name: ip6tables-restore
|
|
||||||
shell: ip6tables-restore < /etc/iptables/rules.v6
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
- name: activate sysfs variables
|
|
||||||
systemd:
|
|
||||||
name: sysfsutils
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: reload network interfaces
|
|
||||||
systemd:
|
|
||||||
name: networking
|
|
||||||
state: reloaded
|
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload systemd
|
|
||||||
systemd:
|
|
||||||
daemon_reload: yes
|
|
||||||
|
|
||||||
- name: restart systemd unit ffmwu-static-routes
|
|
||||||
systemd:
|
|
||||||
name: ffmwu-static-routes
|
|
||||||
state: restarted
|
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload systemd
|
|
||||||
systemd:
|
|
||||||
daemon_reload: yes
|
|
||||||
|
|
||||||
- name: restart bind9
|
|
||||||
systemd:
|
|
||||||
name: bind9
|
|
||||||
state: restarted
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload systemd unit bird
|
|
||||||
systemd:
|
|
||||||
name: bird
|
|
||||||
state: reloaded
|
|
||||||
|
|
||||||
- name: reload systemd unit bird6
|
|
||||||
systemd:
|
|
||||||
name: bird6
|
|
||||||
state: reloaded
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload systemd unit bird
|
|
||||||
systemd:
|
|
||||||
name: bird
|
|
||||||
state: reloaded
|
|
||||||
|
|
||||||
- name: reload systemd unit bird6
|
|
||||||
systemd:
|
|
||||||
name: bird6
|
|
||||||
state: reloaded
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
- 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
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: restart isc dhcp server
|
|
||||||
systemd:
|
|
||||||
name: isc-dhcp-server
|
|
||||||
enabled: yes
|
|
||||||
state: restarted
|
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
- name: restart fastd intragate instances
|
|
||||||
systemd:
|
|
||||||
name: "fastd@{{ item.0.id }}igVPN-{{ item.1.mtu }}"
|
|
||||||
state: restarted
|
|
||||||
with_subelements:
|
|
||||||
- "{{ meshes }}"
|
|
||||||
- fastd.intragate.instances
|
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
- name: restart fastd mesh instances
|
|
||||||
systemd:
|
|
||||||
name: "fastd@{{ item.0.id }}VPN-{{ item.1.mtu }}"
|
|
||||||
state: restarted
|
|
||||||
with_subelements:
|
|
||||||
- "{{ meshes }}"
|
|
||||||
- fastd.nodes.instances
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload systemd
|
|
||||||
systemd:
|
|
||||||
daemon_reload: yes
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: restart systemd unit radvd
|
|
||||||
systemd:
|
|
||||||
name: radvd
|
|
||||||
state: restarted
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: restart systemd unit tinc
|
|
||||||
systemd:
|
|
||||||
name: tinc
|
|
||||||
enabled: yes
|
|
||||||
state: restarted
|
|
Loading…
Reference in a new issue