Move all handlers to one single role

This commit is contained in:
Tobias Hachmer 2017-10-13 07:28:41 +02:00
parent f56215f03c
commit f934a88661
18 changed files with 80 additions and 120 deletions

View file

@ -3,6 +3,7 @@
- hosts: ffmwu-gateways
remote_user: admin
roles:
- handlers
- prerequisites
- server-repos
- server-basic

View 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

View file

@ -1,5 +0,0 @@
---
- name: reload network interfaces
systemd:
name: networking
state: reloaded

View file

@ -1,5 +0,0 @@
---
- name: reload network interfaces
systemd:
name: networking
state: reloaded

View file

@ -1,5 +0,0 @@
---
- name: reload network interfaces
systemd:
name: networking
state: reloaded

View file

@ -1,6 +0,0 @@
---
- name: iptables-restore
shell: iptables-restore < /etc/iptables/rules.v4
- name: ip6tables-restore
shell: ip6tables-restore < /etc/iptables/rules.v6

View file

@ -1,10 +0,0 @@
---
- name: activate sysfs variables
systemd:
name: sysfsutils
state: restarted
- name: reload network interfaces
systemd:
name: networking
state: reloaded

View file

@ -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

View file

@ -1,9 +0,0 @@
---
- name: reload systemd
systemd:
daemon_reload: yes
- name: restart bind9
systemd:
name: bind9
state: restarted

View file

@ -1,10 +0,0 @@
---
- name: reload systemd unit bird
systemd:
name: bird
state: reloaded
- name: reload systemd unit bird6
systemd:
name: bird6
state: reloaded

View file

@ -1,10 +0,0 @@
---
- name: reload systemd unit bird
systemd:
name: bird
state: reloaded
- name: reload systemd unit bird6
systemd:
name: bird6
state: reloaded

View file

@ -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

View file

@ -1,6 +0,0 @@
---
- name: restart isc dhcp server
systemd:
name: isc-dhcp-server
enabled: yes
state: restarted

View file

@ -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

View file

@ -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

View file

@ -1,4 +0,0 @@
---
- name: reload systemd
systemd:
daemon_reload: yes

View file

@ -1,5 +0,0 @@
---
- name: restart systemd unit radvd
systemd:
name: radvd
state: restarted

View file

@ -1,6 +0,0 @@
---
- name: restart systemd unit tinc
systemd:
name: tinc
enabled: yes
state: restarted