Fix sanity test for modules

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde
2021-02-15 13:21:13 +05:30
parent 20f70caa1f
commit ea8fc70373
20 changed files with 73 additions and 86 deletions

View File

@@ -48,9 +48,17 @@
var: _disable_test1
verbosity: 1
- name: Before gathering the fact
debug:
msg: "{{ ansible_selinux }}"
- name: TEST 1 | Re-gather facts
setup:
- name: After gathering the fact
debug:
msg: "{{ ansible_selinux }}"
- name: TEST 1 | Assert that status was changed, reboot_required is True, a warning was displayed, and SELinux is configured properly
assert:
that:
@@ -74,7 +82,7 @@
var: _disable_test2
verbosity: 1
- name: TEST 1 | Assert that no change is reported, a warnking was dispalyed, and reboot_required is True
- name: TEST 1 | Assert that no change is reported, a warning was displayed, and reboot_required is True
assert:
that:
- _disable_test2 is not changed
@@ -147,7 +155,7 @@
var: _state_test2
verbosity: 1
- name: TEST 2 | Assert that no change was reported, no warnings were dispalyed, and reboot_required is False
- name: TEST 2 | Assert that no change was reported, no warnings were displayed, and reboot_required is False
assert:
that:
- _state_test2 is not changed
@@ -380,7 +388,7 @@
var: _lineinfile_out1
verbosity: 1
- name: TEST 5 | Set SELinux to enforcing
- name: TEST 5 | Set SELinux to enforcing
selinux:
state: enforcing
policy: targeted