xoxys.firewalld/molecule/default/tests/test_default.py

19 lines
443 B
Python
Raw Normal View History

2022-06-13 18:47:12 +00:00
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
2022-06-13 20:18:21 +00:00
2024-02-18 11:32:10 +00:00
def test_firewalld_installed(host):
2022-06-13 20:18:21 +00:00
firewalld = host.package("firewalld")
assert firewalld.is_installed
def test_firewalld_running_and_enabled(host):
firewalld = host.service("firewalld")
assert firewalld.is_running
assert firewalld.is_enabled