feat: create handlers in top-level

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-11-18 15:21:19 +01:00
parent e3bff6c8c4
commit e89bd7956e
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8
3 changed files with 13 additions and 0 deletions

6
handlers/main.yml Normal file
View file

@ -0,0 +1,6 @@
---
- name: Restart nginx
ansible.builtin.service:
name: nginx
state: restarted
become: true

View file

@ -112,3 +112,7 @@
wg_address: "{{ item.address }}" wg_address: "{{ item.address }}"
wg_peers: "{{ item.peers }}" wg_peers: "{{ item.peers }}"
tags: wireguard tags: wireguard
handlers:
- name: Import common handlers
ansible.builtin.import_tasks: ../handlers/main.yml

View file

@ -3,3 +3,6 @@
hosts: all hosts: all
gather_facts: true gather_facts: true
roles: [] roles: []
handlers:
- name: Import common handlers
ansible.builtin.import_tasks: ../handlers/main.yml