ansible/test/integration/targets/ufw/tasks/main.yml
Felix Fontein a707f1a79c ufw: add integration tests (#50374)
* Add basic integration tests for ufw.

* Being more honest.
2018-12-29 13:50:04 +00:00

23 lines
608 B
YAML

---
# Make sure ufw is installed
- name: Install EPEL repository (RHEL only)
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
state: present
when: ansible_distribution == 'RedHat'
- name: Install iptables (SuSE only)
package:
name: iptables
when: ansible_os_family == 'Suse'
- name: Install ufw
package:
name: ufw
# Make sure ufw is not enabled
- name: Disable ufw in case it is running
ufw:
state: disabled
# Run the tests
- block:
- include_tasks: run-test.yml
with_fileglob:
- "tests/*.yml"