Skip to content

Commit

Permalink
docker: add dependencies, rework into handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
dezeroku committed May 19, 2024
1 parent 2f099f0 commit ac250ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 7 additions & 0 deletions roles/docker/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Reload nftables
become: true
become_user: root
ansible.builtin.systemd:
name: nftables
state: restarted
3 changes: 3 additions & 0 deletions roles/docker/meta/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
dependencies:
- role: firewall
12 changes: 2 additions & 10 deletions roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ac250ab

Please sign in to comment.