diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..1156b0b --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: Restart nginx + ansible.builtin.service: + name: nginx + state: restarted + become: true diff --git a/playbooks/bootstrap.yml b/playbooks/bootstrap.yml index f8bf6d7..645eedd 100644 --- a/playbooks/bootstrap.yml +++ b/playbooks/bootstrap.yml @@ -112,3 +112,7 @@ wg_address: "{{ item.address }}" wg_peers: "{{ item.peers }}" tags: wireguard + + handlers: + - name: Import common handlers + ansible.builtin.import_tasks: ../handlers/main.yml diff --git a/playbooks/playground.yml b/playbooks/playground.yml index e516b6a..3b69e6d 100644 --- a/playbooks/playground.yml +++ b/playbooks/playground.yml @@ -3,3 +3,6 @@ hosts: all gather_facts: true roles: [] + handlers: + - name: Import common handlers + ansible.builtin.import_tasks: ../handlers/main.yml