From aad6658d0ca88871a32b75350fa3744078f4ccfe Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 18 Oct 2019 15:04:04 +0200 Subject: [PATCH] fix molecule playbook and add missing test --- molecule/default/playbook.yml | 3 +++ molecule/default/tests/test_default.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index 27a5ee7..cc51749 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -1,5 +1,8 @@ --- - name: Converge hosts: all + vars: + selinux_state: enforcing + roles: - role: xoxys.selinux diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py index ea15d88..e51f364 100644 --- a/molecule/default/tests/test_default.py +++ b/molecule/default/tests/test_default.py @@ -10,5 +10,6 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_selinux_setup(host): - assert host.command.check_output('/usr/sbin/getenforce') == 'Enforcing' - assert host.package('policycoreutils-python').is_installed + assert host.command.check_output("/usr/sbin/getenforce") == "Enforcing" + assert host.package("policycoreutils-python").is_installed + assert host.file("/.autorelabel").exists