diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml new file mode 100644 index 0000000..0a6f173 --- /dev/null +++ b/roles/docker/handlers/main.yml @@ -0,0 +1,7 @@ +--- +- name: Reload nftables + become: true + become_user: root + ansible.builtin.systemd: + name: nftables + state: restarted diff --git a/roles/docker/meta/main.yaml b/roles/docker/meta/main.yaml new file mode 100644 index 0000000..2a7a00a --- /dev/null +++ b/roles/docker/meta/main.yaml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: firewall diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index b076724..05060fb 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -31,13 +31,5 @@ src: docker-nft.conf dest: /etc/nftables.d/01-docker.conf mode: 0644 - register: nftables_config - -# TODO: rework properly -- name: Reload nftables configuration - become: true - become_user: root - ansible.builtin.systemd: - name: nftables - state: started - when: nftables_config.changed # noqa: no-handler + notify: + - Reload nftables