2018-12-29 14:50:04 +01:00
|
|
|
---
|
2019-01-09 20:59:23 +01:00
|
|
|
- pause:
|
|
|
|
# ufw creates backups of the rule files with a timestamp; if reset is called
|
|
|
|
# twice in a row fast enough (so that both timestamps are taken in the same second),
|
|
|
|
# the second call will notice that the backup files are already there and fail.
|
|
|
|
# Waiting one second fixes this problem.
|
|
|
|
seconds: 1
|
2019-01-08 14:00:20 +01:00
|
|
|
- name: Reset ufw to factory defaults
|
|
|
|
ufw:
|
|
|
|
state: reset
|
|
|
|
- name: Disable ufw
|
|
|
|
ufw:
|
|
|
|
# Some versions of ufw have a bug which won't disable on reset.
|
|
|
|
# That's why we explicitly deactivate here. See
|
|
|
|
# https://bugs.launchpad.net/ufw/+bug/1810082
|
|
|
|
state: disabled
|
2018-12-29 14:50:04 +01:00
|
|
|
- name: "Loading tasks from {{ item }}"
|
|
|
|
include_tasks: "{{ item }}"
|
2019-02-12 09:05:14 +01:00
|
|
|
- name: Reset to factory defaults
|
|
|
|
ufw:
|
|
|
|
state: reset
|