Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/ufw/tasks/run-test.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - pause:
7 # ufw creates backups of the rule files with a timestamp; if reset is called
8 # twice in a row fast enough (so that both timestamps are taken in the same second),
9 # the second call will notice that the backup files are already there and fail.
10 # Waiting one second fixes this problem.
11 seconds: 1
12 - name: Reset ufw to factory defaults
13 ufw:
14 state: reset
15 - name: Disable ufw
16 ufw:
17 # Some versions of ufw have a bug which won't disable on reset.
18 # That's why we explicitly deactivate here. See
19 # https://bugs.launchpad.net/ufw/+bug/1810082
20 state: disabled
21 - name: "Loading tasks from {{ item }}"
22 include_tasks: "{{ item }}"
23 - name: Reset to factory defaults
24 ufw:
25 state: reset