2020-08-15 10:36:07 +02:00
|
|
|
---
|
2020-09-25 08:01:17 +02:00
|
|
|
####################################################################
|
|
|
|
# WARNING: These are designed specifically for Ansible tests #
|
|
|
|
# and should not be used as examples of how to write Ansible roles #
|
|
|
|
####################################################################
|
|
|
|
|
2022-08-05 21:31:34 +02:00
|
|
|
# Copyright (c) Ansible Project
|
|
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2020-08-15 10:36:07 +02:00
|
|
|
- name: ensure iptables package is installed
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- iptables
|
2023-02-15 22:55:23 +01:00
|
|
|
become: true
|
2020-08-15 10:36:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
- name: include tasks
|
|
|
|
vars:
|
|
|
|
iptables_saved: "/tmp/test_iptables_state.saved"
|
|
|
|
iptables_tests: "/tmp/test_iptables_state.tests"
|
|
|
|
|
|
|
|
block:
|
|
|
|
- name: include tasks to perform basic tests (check_mode, async, idempotency)
|
|
|
|
include_tasks: tests/00-basic.yml
|
|
|
|
|
|
|
|
- name: include tasks to test tables handling
|
|
|
|
include_tasks: tests/01-tables.yml
|
|
|
|
when:
|
|
|
|
- xtables_lock is undefined
|
|
|
|
|
2024-03-24 18:02:48 +01:00
|
|
|
- name: include tasks to test partial restore files
|
|
|
|
include_tasks: tests/02-partial-restore.yml
|
|
|
|
when:
|
|
|
|
- xtables_lock is undefined
|
|
|
|
|
|
|
|
|
2020-08-15 10:36:07 +02:00
|
|
|
- name: include tasks to test rollbacks
|
|
|
|
include_tasks: tests/10-rollback.yml
|
|
|
|
when:
|
|
|
|
- xtables_lock is undefined
|
|
|
|
- ansible_connection in ['ssh', 'paramiko', 'smart']
|
|
|
|
|
2023-02-15 22:55:23 +01:00
|
|
|
become: true
|