Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ roles:
## Note regarding UFW firewall rules

Instead of resetting `ufw` every run and by doing so causing network traffic
disruption, the role deletes every `ufw` rule without
`comment: ansible managed` task parameter and value.
disruption, the role deletes every `ufw` rule that doesn't have a comment
ending with `ansible managed`.

The role also sets default deny policies, which means that firewall rules
needs to be created for any additional ports except those specified in
Expand Down
2 changes: 1 addition & 1 deletion tasks/ufw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
ansible.builtin.shell:
cmd: |
set -o pipefail
ufw show added | grep '^ufw' | grep -i -v "'ansible\smanaged'" | sed 's/ufw //g'
ufw show added | grep '^ufw' | grep -i -v "comment '.*ansible\smanaged'" | sed 's/ufw //g'
args:
executable: /bin/bash
changed_when: false
Expand Down
Loading