+ cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_all_purge.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml PLAYBOOK: tests_all_purge.yml ************************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_all_purge.yml PLAY [Test that selinux_all_purge drops local modifications, defaults to no] *** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [Install SELinux tool semanage on Fedora] ********************************* task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [Add a Linux System Roles SELinux User] *********************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:19 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "comment": "Linux System Roles SELinux User", "create_home": true, "group": 1001, "home": "/home/sar-user", "name": "sar-user", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1001} TASK [Add some mapping] ******************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:24 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": "echo -e -n \"boolean -m --on samba_enable_home_dirs\nport -a -p tcp -t ssh_port_t 22100\nfcontext -a -t user_home_dir_t /tmp/test_dir\nlogin -a -s staff_u sar-user\n\" | /usr/sbin/semanage -i -", "delta": "0:00:04.848939", "end": "2020-03-04 19:23:46.657331", "rc": 0, "start": "2020-03-04 19:23:41.808392", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Apply role with defaults, should not drop local modifications] *********** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:27 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.328697", "end": "2020-03-04 19:23:58.759151", "rc": 0, "start": "2020-03-04 19:23:57.430454", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.663780", "end": "2020-03-04 19:23:59.929364", "rc": 0, "start": "2020-03-04 19:23:59.265584", "stderr": "", "stderr_lines": [], "stdout": "samba_enable_home_dirs (on , on) Allow samba to enable home dirs", "stdout_lines": ["samba_enable_home_dirs (on , on) Allow samba to enable home dirs"]} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.546233", "end": "2020-03-04 19:24:00.862067", "rc": 0, "start": "2020-03-04 19:24:00.315834", "stderr": "", "stderr_lines": [], "stdout": "ssh_port_t tcp 22100", "stdout_lines": ["ssh_port_t tcp 22100"]} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.584852", "end": "2020-03-04 19:24:01.799035", "rc": 0, "start": "2020-03-04 19:24:01.214183", "stderr": "", "stderr_lines": [], "stdout": "sar-user staff_u s0 *", "stdout_lines": ["sar-user staff_u s0 *"]} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.601224", "end": "2020-03-04 19:24:02.779906", "rc": 0, "start": "2020-03-04 19:24:02.178682", "stderr": "", "stderr_lines": [], "stdout": "/tmp/test_dir all files system_u:object_r:user_home_dir_t:s0 ", "stdout_lines": ["/tmp/test_dir all files system_u:object_r:user_home_dir_t:s0 "]} TASK [Check if local modifications are not empty - booleans] ******************* task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:32 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Check if local modifications are not empty - port] *********************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:35 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Check if local modifications are not empty - login] ********************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:38 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Check if local modifications are not empty - fcontext] ******************* task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:41 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Apply the role to drop local modifications] ****************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:45 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "-i", "-"], "delta": "0:00:03.031680", "end": "2020-03-04 19:24:14.424945", "rc": 0, "start": "2020-03-04 19:24:11.393265", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.290254", "end": "2020-03-04 19:24:16.339079", "rc": 0, "start": "2020-03-04 19:24:15.048825", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.562985", "end": "2020-03-04 19:24:17.426027", "rc": 0, "start": "2020-03-04 19:24:16.863042", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.537315", "end": "2020-03-04 19:24:18.330651", "rc": 0, "start": "2020-03-04 19:24:17.793336", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.504008", "end": "2020-03-04 19:24:19.191542", "rc": 0, "start": "2020-03-04 19:24:18.687534", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.599231", "end": "2020-03-04 19:24:20.158150", "rc": 0, "start": "2020-03-04 19:24:19.558919", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Check if local modifications are empty - booleans] *********************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Check if local modifications are empty - port] *************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:55 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Check if local modifications are empty - login] ************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:58 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Check if local modifications are empty - fcontext] *********************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:61 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Remove Linux System Roles SELinux User] ********************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_purge.yml:65 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "force": false, "name": "sar-user", "remove": true, "state": "absent"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=33 changed=15 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_all_transitions.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 PLAYBOOK: tests_all_transitions.yml ******************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_all_transitions.yml PLAY [Test all the possible selinux_state transitions] ************************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_all_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [save config] ************************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_all_transitions.yml:11 included: /tmp/tmphnxw_6h_/tests/selinux_config_save.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [Backup original /etc/selinux/config] ************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_config_save.yml:1 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "checksum": "61a40e1faa78b234462d16dffbdb3fb869442406", "dest": "/etc/selinux/config.test_selinux_save", "gid": 0, "group": "root", "md5sum": "eab350e0c5241d4394c2099bf86e9312", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 548, "src": "/etc/selinux/config", "state": "file", "uid": 0} TASK [test all the possible state transitions] ********************************* task path: /tmp/tmphnxw_6h_/tests/tests_all_transitions.yml:14 included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'permissive', u'permissive']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'permissive', u'enforcing']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'permissive', u'disabled']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'enforcing', u'permissive']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'enforcing', u'enforcing']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'enforcing', u'disabled']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'disabled', u'permissive']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'disabled', u'enforcing']) included: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 => (item=[u'disabled', u'disabled']) TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition permissive -> permissive" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "SELinux state changed from 'enforcing' to 'permissive', Config SELinux state changed from 'enforcing' to 'permissive'", "policy": "targeted", "reboot_required": false, "state": "permissive"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.404094", "end": "2020-03-04 19:27:00.423456", "rc": 0, "start": "2020-03-04 19:26:59.019362", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"config_mode": "permissive", "mode": "permissive", "policyvers": 31, "status": "enabled", "type": "targeted"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.338623", "end": "2020-03-04 19:27:11.521967", "rc": 0, "start": "2020-03-04 19:27:10.183344", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "configfile": "/etc/selinux/config", "msg": "", "policy": "targeted", "reboot_required": false, "state": "permissive"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.343893", "end": "2020-03-04 19:27:22.748052", "rc": 0, "start": "2020-03-04 19:27:21.404159", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition permissive -> enforcing" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "configfile": "/etc/selinux/config", "msg": "", "policy": "targeted", "reboot_required": false, "state": "permissive"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.325130", "end": "2020-03-04 19:27:34.221859", "rc": 0, "start": "2020-03-04 19:27:32.896729", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"config_mode": "permissive", "mode": "permissive", "policyvers": 31, "status": "enabled", "type": "targeted"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.369208", "end": "2020-03-04 19:27:44.940998", "rc": 0, "start": "2020-03-04 19:27:43.571790", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "SELinux state changed from 'permissive' to 'enforcing', Config SELinux state changed from 'permissive' to 'enforcing'", "policy": "targeted", "reboot_required": false, "state": "enforcing"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.325868", "end": "2020-03-04 19:27:56.335825", "rc": 0, "start": "2020-03-04 19:27:55.009957", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition permissive -> disabled" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "SELinux state changed from 'enforcing' to 'permissive', Config SELinux state changed from 'enforcing' to 'permissive'", "policy": "targeted", "reboot_required": false, "state": "permissive"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.307349", "end": "2020-03-04 19:28:08.001144", "rc": 0, "start": "2020-03-04 19:28:06.693795", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"config_mode": "permissive", "mode": "permissive", "policyvers": 31, "status": "enabled", "type": "targeted"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.334023", "end": "2020-03-04 19:28:18.871834", "rc": 0, "start": "2020-03-04 19:28:17.537811", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 [WARNING]: SELinux state change will take effect next reboot changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'permissive' to 'disabled'", "policy": "targeted", "reboot_required": true, "state": "disabled"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "285848461725.13054", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/285848461725.13054", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 17} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition enforcing -> permissive" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 [WARNING]: Reboot is required to set SELinux state to enforcing changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'disabled' to 'enforcing'", "policy": "targeted", "reboot_required": true, "state": "enforcing"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "278056365590.1559", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/278056365590.1559", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 61} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"config_mode": "enforcing", "mode": "enforcing", "policyvers": 31, "status": "enabled", "type": "targeted"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.308874", "end": "2020-03-04 19:30:13.599540", "rc": 0, "start": "2020-03-04 19:30:12.290666", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "SELinux state changed from 'enforcing' to 'permissive', Config SELinux state changed from 'enforcing' to 'permissive'", "policy": "targeted", "reboot_required": false, "state": "permissive"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.336262", "end": "2020-03-04 19:30:24.635867", "rc": 0, "start": "2020-03-04 19:30:23.299605", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition enforcing -> enforcing" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "SELinux state changed from 'permissive' to 'enforcing', Config SELinux state changed from 'permissive' to 'enforcing'", "policy": "targeted", "reboot_required": false, "state": "enforcing"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.380851", "end": "2020-03-04 19:30:36.517404", "rc": 0, "start": "2020-03-04 19:30:35.136553", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"config_mode": "enforcing", "mode": "enforcing", "policyvers": 31, "status": "enabled", "type": "targeted"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.316039", "end": "2020-03-04 19:30:47.756261", "rc": 0, "start": "2020-03-04 19:30:46.440222", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "configfile": "/etc/selinux/config", "msg": "", "policy": "targeted", "reboot_required": false, "state": "enforcing"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.367619", "end": "2020-03-04 19:30:58.777150", "rc": 0, "start": "2020-03-04 19:30:57.409531", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition enforcing -> disabled" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "configfile": "/etc/selinux/config", "msg": "", "policy": "targeted", "reboot_required": false, "state": "enforcing"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.325686", "end": "2020-03-04 19:31:10.141875", "rc": 0, "start": "2020-03-04 19:31:08.816189", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"config_mode": "enforcing", "mode": "enforcing", "policyvers": 31, "status": "enabled", "type": "targeted"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.335237", "end": "2020-03-04 19:31:20.690051", "rc": 0, "start": "2020-03-04 19:31:19.354814", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 [WARNING]: SELinux state temporarily changed from 'enforcing' to 'permissive'. State change will take effect next reboot. changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'enforcing' to 'disabled'", "policy": "targeted", "reboot_required": true, "state": "disabled"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "476135917422.4638", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/476135917422.4638", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 17} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition disabled -> permissive" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "configfile": "/etc/selinux/config", "msg": "", "policy": "targeted", "reboot_required": false, "state": "disabled"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "SELinux is disabled on system - some SELinux modules can crash" } TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"status": "disabled"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "SELinux is disabled on system - some SELinux modules can crash" } TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 [WARNING]: Reboot is required to set SELinux state to permissive changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'disabled' to 'permissive'", "policy": "targeted", "reboot_required": true, "state": "permissive"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "244914443517.2276", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/244914443517.2276", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 61} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition disabled -> enforcing" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'permissive' to 'disabled'", "policy": "targeted", "reboot_required": true, "state": "disabled"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "576564802876.1561", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/576564802876.1561", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 17} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"status": "disabled"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "SELinux is disabled on system - some SELinux modules can crash" } TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'disabled' to 'enforcing'", "policy": "targeted", "reboot_required": true, "state": "enforcing"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "422646280735.1880", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/422646280735.1880", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 61} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [display transition name] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "testing transition disabled -> disabled" } TASK [setup the initial state] ************************************************* task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:5 included: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:3 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'enforcing' to 'disabled'", "policy": "targeted", "reboot_required": true, "state": "disabled"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [handle errors] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:12 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "496222737803.1569", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/496222737803.1569", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_apply_reboot.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 21} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that initial state has been set up properly] *********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:14 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [save the initial state] ************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"initial_selinux_fact": {"status": "disabled"}}, "changed": false} TASK [apply the role without parameters] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:22 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "SELinux is disabled on system - some SELinux modules can crash" } TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that the run w/o parameters has not changed anything] ************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:30 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [apply the desired state if possible without reboot] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:34 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "configfile": "/etc/selinux/config", "msg": "", "policy": "targeted", "reboot_required": false, "state": "disabled"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "msg": "SELinux is disabled on system - some SELinux modules can crash" } TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [apply the desired state if necessary with reboot] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:44 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [refresh facts] *********************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [check that something changed if it should have] ************************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [check that nothing changed if it should not have] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:61 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been applied properly] ********************** task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [check that desired state has been saved properly] ************************ task path: /tmp/tmphnxw_6h_/tests/selinux_test_transitions.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [restore config] ********************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_all_transitions.yml:23 included: /tmp/tmphnxw_6h_/tests/selinux_config_restore.yml for /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TASK [Restore original /etc/selinux/config] ************************************ task path: /tmp/tmphnxw_6h_/tests/selinux_config_restore.yml:1 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "checksum": "61a40e1faa78b234462d16dffbdb3fb869442406", "dest": "/etc/selinux/config", "gid": 0, "group": "root", "md5sum": "eab350e0c5241d4394c2099bf86e9312", "mode": "0644", "owner": "root", "size": 548, "src": "/etc/selinux/config.test_selinux_save", "state": "file", "uid": 0} TASK [Remove /etc/selinux/config backup] *************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_config_restore.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "path": "/etc/selinux/config.test_selinux_save", "state": "absent"} TASK [restart managed host] **************************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_config_restore.yml:15 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_job_id": "850680165630.2101", "changed": true, "finished": 0, "results_file": "/root/.ansible_async/850680165630.2101", "started": 1} TASK [wait for managed host to come back] ************************************** task path: /tmp/tmphnxw_6h_/tests/selinux_config_restore.yml:21 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "elapsed": 61} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=281 changed=39 unreachable=0 failed=7 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_boolean.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml PLAYBOOK: tests_boolean.yml **************************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_boolean.yml PLAY [Check if selinux role sets SELinux booleans] ***************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:2 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [initial changes] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:7 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-D"], "delta": "0:00:01.876568", "end": "2020-03-04 19:38:59.189063", "rc": 0, "start": "2020-03-04 19:38:57.312495", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.362427", "end": "2020-03-04 19:39:00.987259", "rc": 0, "start": "2020-03-04 19:38:59.624832", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'state': u'on', u'name': u'samba_enable_home_dirs', u'persistent': u'yes'}) => {"changed": true, "item": {"name": "samba_enable_home_dirs", "persistent": "yes", "state": "on"}, "name": "samba_enable_home_dirs"} TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.559803", "end": "2020-03-04 19:39:03.311239", "rc": 0, "start": "2020-03-04 19:39:02.751436", "stderr": "", "stderr_lines": [], "stdout": "samba_enable_home_dirs (on , on) Allow samba to enable home dirs", "stdout_lines": ["samba_enable_home_dirs (on , on) Allow samba to enable home dirs"]} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.587714", "end": "2020-03-04 19:39:04.308783", "rc": 0, "start": "2020-03-04 19:39:03.721069", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.515698", "end": "2020-03-04 19:39:05.172316", "rc": 0, "start": "2020-03-04 19:39:04.656618", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.597167", "end": "2020-03-04 19:39:06.138639", "rc": 0, "start": "2020-03-04 19:39:05.541472", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after initial changes and before other changes] *************** task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:16 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"boolean_before": ["samba_enable_home_dirs (on , on) Allow samba to enable home dirs"]}, "changed": false} TASK [Check if there are SELinux boolean changes] ****************************** task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:20 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [subsequent changes] ****************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:24 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.370604", "end": "2020-03-04 19:39:16.456316", "rc": 0, "start": "2020-03-04 19:39:15.085712", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'state': u'on', u'name': u'httpd_can_network_connect', u'persistent': u'yes'}) => {"changed": true, "item": {"name": "httpd_can_network_connect", "persistent": "yes", "state": "on"}, "name": "httpd_can_network_connect"} TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.522857", "end": "2020-03-04 19:39:18.713086", "rc": 0, "start": "2020-03-04 19:39:18.190229", "stderr": "", "stderr_lines": [], "stdout": "httpd_can_network_connect (on , on) Allow httpd to can network connect\nsamba_enable_home_dirs (on , on) Allow samba to enable home dirs", "stdout_lines": ["httpd_can_network_connect (on , on) Allow httpd to can network connect", "samba_enable_home_dirs (on , on) Allow samba to enable home dirs"]} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.536055", "end": "2020-03-04 19:39:19.617433", "rc": 0, "start": "2020-03-04 19:39:19.081378", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.507354", "end": "2020-03-04 19:39:20.486990", "rc": 0, "start": "2020-03-04 19:39:19.979636", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.596672", "end": "2020-03-04 19:39:21.459333", "rc": 0, "start": "2020-03-04 19:39:20.862661", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after other changes] ****************************************** task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:33 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"boolean_after": ["httpd_can_network_connect (on , on) Allow httpd to can network connect", "samba_enable_home_dirs (on , on) Allow samba to enable home dirs"]}, "changed": false} TASK [Check if there are SELinux boolean changes] ****************************** task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:37 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:41 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-D"], "delta": "0:00:02.732629", "end": "2020-03-04 19:39:33.307733", "rc": 0, "start": "2020-03-04 19:39:30.575104", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.336568", "end": "2020-03-04 19:39:35.133189", "rc": 0, "start": "2020-03-04 19:39:33.796621", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.532680", "end": "2020-03-04 19:39:36.263659", "rc": 0, "start": "2020-03-04 19:39:35.730979", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.536460", "end": "2020-03-04 19:39:37.166104", "rc": 0, "start": "2020-03-04 19:39:36.629644", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.520650", "end": "2020-03-04 19:39:38.058851", "rc": 0, "start": "2020-03-04 19:39:37.538201", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.578420", "end": "2020-03-04 19:39:39.009789", "rc": 0, "start": "2020-03-04 19:39:38.431369", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Check if there are no SELinux boolean mapping changes] ******************* task path: /tmp/tmphnxw_6h_/tests/tests_boolean.yml:47 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=38 changed=20 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_default.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 PLAYBOOK: tests_default.yml **************************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_default.yml PLAY [Ensure that the role runs with default parameters] *********************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_default.yml:2 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.392449", "end": "2020-03-04 19:41:00.969397", "rc": 0, "start": "2020-03-04 19:40:59.576948", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=7 changed=2 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_default_vars.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 PLAYBOOK: tests_default_vars.yml *********************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_default_vars.yml PLAY [Ensure that the role declares all paremeters in defaults] **************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_default_vars.yml:1 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.436112", "end": "2020-03-04 19:42:43.166671", "rc": 0, "start": "2020-03-04 19:42:41.730559", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [assert] ****************************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_default_vars.yml:7 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_state) => { "changed": false, "item": "selinux_state", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_policy) => { "changed": false, "item": "selinux_policy", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_booleans) => { "changed": false, "item": "selinux_booleans", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_fcontexts) => { "changed": false, "item": "selinux_fcontexts", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_logins) => { "changed": false, "item": "selinux_logins", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_ports) => { "changed": false, "item": "selinux_ports", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_restore_dirs) => { "changed": false, "item": "selinux_restore_dirs", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_all_purge) => { "changed": false, "item": "selinux_all_purge", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_booleans_purge) => { "changed": false, "item": "selinux_booleans_purge", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_fcontexts_purge) => { "changed": false, "item": "selinux_fcontexts_purge", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_ports_purge) => { "changed": false, "item": "selinux_ports_purge", "msg": "All assertions passed" } ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item=selinux_logins_purge) => { "changed": false, "item": "selinux_logins_purge", "msg": "All assertions passed" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=8 changed=2 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_fcontext.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml PLAYBOOK: tests_fcontext.yml *************************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_fcontext.yml PLAY [Check if selinux role sets SELinux fcontext mappings] ******************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:2 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [initial changes] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:8 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-D"], "delta": "0:00:02.170975", "end": "2020-03-04 19:45:29.041948", "rc": 0, "start": "2020-03-04 19:45:26.870973", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.315441", "end": "2020-03-04 19:45:30.795781", "rc": 0, "start": "2020-03-04 19:45:29.480340", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'setype': u'user_home_dir_t', u'ftype': u'd', u'target': u'/tmp/test_dir1(/.*)?'}) => {"changed": true, "ftype": "d", "item": {"ftype": "d", "setype": "user_home_dir_t", "target": "/tmp/test_dir1(/.*)?"}, "serange": "s0", "setype": "user_home_dir_t", "seuser": "system_u", "state": "present", "target": "/tmp/test_dir1(/.*)?"} TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.552319", "end": "2020-03-04 19:45:34.844201", "rc": 0, "start": "2020-03-04 19:45:34.291882", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.579102", "end": "2020-03-04 19:45:35.780681", "rc": 0, "start": "2020-03-04 19:45:35.201579", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.587613", "end": "2020-03-04 19:45:36.750326", "rc": 0, "start": "2020-03-04 19:45:36.162713", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.636603", "end": "2020-03-04 19:45:37.733826", "rc": 0, "start": "2020-03-04 19:45:37.097223", "stderr": "", "stderr_lines": [], "stdout": "/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 ", "stdout_lines": ["/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 "]} TASK [save state after initial changes and before other changes] *************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:17 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"fcontext_before": "/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 "}, "changed": false} TASK [Check if there are SELinux fcontext mapping changes] ********************* task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:21 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [subsequent changes] ****************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:25 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.336244", "end": "2020-03-04 19:45:48.238500", "rc": 0, "start": "2020-03-04 19:45:46.902256", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'setype': u'user_home_dir_t', u'ftype': u'd', u'target': u'/tmp/test_dir2(/.*)?'}) => {"changed": true, "ftype": "d", "item": {"ftype": "d", "setype": "user_home_dir_t", "target": "/tmp/test_dir2(/.*)?"}, "serange": "s0", "setype": "user_home_dir_t", "seuser": "system_u", "state": "present", "target": "/tmp/test_dir2(/.*)?"} TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.578405", "end": "2020-03-04 19:45:52.623249", "rc": 0, "start": "2020-03-04 19:45:52.044844", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.572594", "end": "2020-03-04 19:45:53.598186", "rc": 0, "start": "2020-03-04 19:45:53.025592", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.579671", "end": "2020-03-04 19:45:54.566252", "rc": 0, "start": "2020-03-04 19:45:53.986581", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.653899", "end": "2020-03-04 19:45:55.650160", "rc": 0, "start": "2020-03-04 19:45:54.996261", "stderr": "", "stderr_lines": [], "stdout": "/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 \n/tmp/test_dir2(/.*)? directory system_u:object_r:user_home_dir_t:s0 ", "stdout_lines": ["/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 ", "/tmp/test_dir2(/.*)? directory system_u:object_r:user_home_dir_t:s0 "]} TASK [save state after other changes] ****************************************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:34 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"fcontext_after": "/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 \n/tmp/test_dir2(/.*)? directory system_u:object_r:user_home_dir_t:s0 "}, "changed": false} TASK [Check if there are SELinux fcontext mapping changes] ********************* task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:38 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [revert subsequent changes] *********************************************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:42 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.329152", "end": "2020-03-04 19:46:06.100554", "rc": 0, "start": "2020-03-04 19:46:04.771402", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'setype': u'user_home_dir_t', u'ftype': u'd', u'target': u'/tmp/test_dir2(/.*)?', u'state': u'absent'}) => {"changed": true, "ftype": "d", "item": {"ftype": "d", "setype": "user_home_dir_t", "state": "absent", "target": "/tmp/test_dir2(/.*)?"}, "setype": "user_home_dir_t", "state": "absent", "target": "/tmp/test_dir2(/.*)?"} TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.606733", "end": "2020-03-04 19:46:10.162190", "rc": 0, "start": "2020-03-04 19:46:09.555457", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.551221", "end": "2020-03-04 19:46:11.069615", "rc": 0, "start": "2020-03-04 19:46:10.518394", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.529997", "end": "2020-03-04 19:46:11.946845", "rc": 0, "start": "2020-03-04 19:46:11.416848", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.597607", "end": "2020-03-04 19:46:12.885149", "rc": 0, "start": "2020-03-04 19:46:12.287542", "stderr": "", "stderr_lines": [], "stdout": "/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 ", "stdout_lines": ["/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 "]} TASK [save state after reverting other changes] ******************************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:51 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"fcontext_after": "/tmp/test_dir1(/.*)? directory system_u:object_r:user_home_dir_t:s0 "}, "changed": false} TASK [Check if SELinux fcontext mapping is as before] ************************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:55 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:59 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-D"], "delta": "0:00:02.619473", "end": "2020-03-04 19:46:24.267398", "rc": 0, "start": "2020-03-04 19:46:21.647925", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.330740", "end": "2020-03-04 19:46:26.059166", "rc": 0, "start": "2020-03-04 19:46:24.728426", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.606711", "end": "2020-03-04 19:46:27.259408", "rc": 0, "start": "2020-03-04 19:46:26.652697", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.604032", "end": "2020-03-04 19:46:28.246842", "rc": 0, "start": "2020-03-04 19:46:27.642810", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.551387", "end": "2020-03-04 19:46:29.238524", "rc": 0, "start": "2020-03-04 19:46:28.687137", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.608146", "end": "2020-03-04 19:46:30.196459", "rc": 0, "start": "2020-03-04 19:46:29.588313", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Check if there are no SELinux fcontext mapping changes] ****************** task path: /tmp/tmphnxw_6h_/tests/tests_fcontext.yml:65 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=50 changed=26 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_login.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml PLAYBOOK: tests_login.yml ****************************************************** 1 plays in /tmp/tmphnxw_6h_/tests/tests_login.yml PLAY [Check if selinux role sets SELinux login mappings] *********************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:2 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [Add a System Api Roles SELinux User] ************************************* task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:7 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "comment": "System Api Roles SELinux User", "create_home": true, "group": 1001, "home": "/home/sar-user", "name": "sar-user", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1001} TASK [initial changes] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:12 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-D"], "delta": "0:00:01.937629", "end": "2020-03-04 19:50:22.002063", "rc": 0, "start": "2020-03-04 19:50:20.064434", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.312231", "end": "2020-03-04 19:50:23.703478", "rc": 0, "start": "2020-03-04 19:50:22.391247", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'login': u'sar-user', u'seuser': u'staff_u', u'serange': u's0-s0:c0.c1023', u'state': u'present'}) => {"changed": true, "item": {"login": "sar-user", "serange": "s0-s0:c0.c1023", "seuser": "staff_u", "state": "present"}, "login": "sar-user", "serange": "s0-s0:c0.c1023", "seuser": "staff_u", "state": "present"} TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.560804", "end": "2020-03-04 19:50:26.693355", "rc": 0, "start": "2020-03-04 19:50:26.132551", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.544846", "end": "2020-03-04 19:50:27.590392", "rc": 0, "start": "2020-03-04 19:50:27.045546", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.588630", "end": "2020-03-04 19:50:28.582585", "rc": 0, "start": "2020-03-04 19:50:27.993955", "stderr": "", "stderr_lines": [], "stdout": "sar-user staff_u s0-s0:c0.c1023 *", "stdout_lines": ["sar-user staff_u s0-s0:c0.c1023 *"]} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.611609", "end": "2020-03-04 19:50:29.562633", "rc": 0, "start": "2020-03-04 19:50:28.951024", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after initial changes and before other changes] *************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"login_before": "sar-user staff_u s0-s0:c0.c1023 *"}, "changed": false} TASK [Check if there are SELinux login mapping changes] ************************ task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:26 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [subsequent changes] ****************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:30 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.327959", "end": "2020-03-04 19:50:39.639794", "rc": 0, "start": "2020-03-04 19:50:38.311835", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'login': u'__default__', u'seuser': u'staff_u', u'serange': u's0-s0:c0.c1023', u'state': u'present'}) => {"changed": false, "item": {"login": "__default__", "serange": "s0-s0:c0.c1023", "seuser": "staff_u", "state": "present"}, "login": "__default__", "serange": "s0-s0:c0.c1023", "seuser": "staff_u", "state": "present"} TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.521880", "end": "2020-03-04 19:50:42.303821", "rc": 0, "start": "2020-03-04 19:50:41.781941", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.563884", "end": "2020-03-04 19:50:43.226989", "rc": 0, "start": "2020-03-04 19:50:42.663105", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.574019", "end": "2020-03-04 19:50:44.179557", "rc": 0, "start": "2020-03-04 19:50:43.605538", "stderr": "", "stderr_lines": [], "stdout": "__default__ staff_u s0-s0:c0.c1023 *\nsar-user staff_u s0-s0:c0.c1023 *", "stdout_lines": ["__default__ staff_u s0-s0:c0.c1023 *", "sar-user staff_u s0-s0:c0.c1023 *"]} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.644439", "end": "2020-03-04 19:50:45.225486", "rc": 0, "start": "2020-03-04 19:50:44.581047", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after other changes] ****************************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:40 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"login_after": "__default__ staff_u s0-s0:c0.c1023 *\nsar-user staff_u s0-s0:c0.c1023 *"}, "changed": false} TASK [Check if there are SELinux login mapping changes] ************************ task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:44 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [revert subsequent changes] *********************************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:48 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.329891", "end": "2020-03-04 19:50:55.675188", "rc": 0, "start": "2020-03-04 19:50:54.345297", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'login': u'__default__', u'seuser': u'staff_u', u'serange': u's0-s0:c0.c1023', u'state': u'absent'}) => {"changed": true, "item": {"login": "__default__", "serange": "s0-s0:c0.c1023", "seuser": "staff_u", "state": "absent"}, "login": "__default__", "serange": "s0-s0:c0.c1023", "seuser": "staff_u", "state": "absent"} TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.527971", "end": "2020-03-04 19:50:58.337614", "rc": 0, "start": "2020-03-04 19:50:57.809643", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.548807", "end": "2020-03-04 19:50:59.222964", "rc": 0, "start": "2020-03-04 19:50:58.674157", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.537318", "end": "2020-03-04 19:51:00.079189", "rc": 0, "start": "2020-03-04 19:50:59.541871", "stderr": "", "stderr_lines": [], "stdout": "sar-user staff_u s0-s0:c0.c1023 *", "stdout_lines": ["sar-user staff_u s0-s0:c0.c1023 *"]} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.631867", "end": "2020-03-04 19:51:01.073843", "rc": 0, "start": "2020-03-04 19:51:00.441976", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after reverting other changes] ******************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:58 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"login_after": "sar-user staff_u s0-s0:c0.c1023 *"}, "changed": false} TASK [Check if SELinux login mapping is as before] ***************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:62 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:66 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-D"], "delta": "0:00:02.730472", "end": "2020-03-04 19:51:12.369145", "rc": 0, "start": "2020-03-04 19:51:09.638673", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.312476", "end": "2020-03-04 19:51:14.057187", "rc": 0, "start": "2020-03-04 19:51:12.744711", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.593763", "end": "2020-03-04 19:51:15.149534", "rc": 0, "start": "2020-03-04 19:51:14.555771", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.633278", "end": "2020-03-04 19:51:16.212892", "rc": 0, "start": "2020-03-04 19:51:15.579614", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.537080", "end": "2020-03-04 19:51:17.110150", "rc": 0, "start": "2020-03-04 19:51:16.573070", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.611449", "end": "2020-03-04 19:51:18.078533", "rc": 0, "start": "2020-03-04 19:51:17.467084", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Check if there are no SELinux login mapping changes] ********************* task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:72 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Remove a System Api Roles SELinux User] ********************************** task path: /tmp/tmphnxw_6h_/tests/tests_login.yml:76 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "force": false, "name": "sar-user", "remove": false, "state": "absent"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=52 changed=27 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_port.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml statically imported: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml PLAYBOOK: tests_port.yml ******************************************************* 1 plays in /tmp/tmphnxw_6h_/tests/tests_port.yml PLAY [Check if selinux role sets SELinux port mapping] ************************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:2 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [initial changes] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:7 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-D"], "delta": "0:00:02.246746", "end": "2020-03-04 19:53:28.864518", "rc": 0, "start": "2020-03-04 19:53:26.617772", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.332066", "end": "2020-03-04 19:53:30.661175", "rc": 0, "start": "2020-03-04 19:53:29.329109", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'setype': u'ssh_port_t', u'proto': u'tcp', u'state': u'present', u'ports': u'22100'}) => {"changed": true, "item": {"ports": "22100", "proto": "tcp", "setype": "ssh_port_t", "state": "present"}, "ports": ["22100"], "proto": "tcp", "setype": "ssh_port_t", "state": "present"} TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.535506", "end": "2020-03-04 19:53:34.923921", "rc": 0, "start": "2020-03-04 19:53:34.388415", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.595129", "end": "2020-03-04 19:53:35.905914", "rc": 0, "start": "2020-03-04 19:53:35.310785", "stderr": "", "stderr_lines": [], "stdout": "ssh_port_t tcp 22100", "stdout_lines": ["ssh_port_t tcp 22100"]} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.510531", "end": "2020-03-04 19:53:36.759382", "rc": 0, "start": "2020-03-04 19:53:36.248851", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.591305", "end": "2020-03-04 19:53:37.674929", "rc": 0, "start": "2020-03-04 19:53:37.083624", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after initial changes and before other changes] *************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:16 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"port_before": "ssh_port_t tcp 22100"}, "changed": false} TASK [Check if there are SELinux port mapping changes] ************************* task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:20 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [subsequent changes] ****************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:24 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.357054", "end": "2020-03-04 19:53:48.397183", "rc": 0, "start": "2020-03-04 19:53:47.040129", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'setype': u'ssh_port_t', u'proto': u'tcp', u'state': u'present', u'ports': u'22022'}) => {"changed": true, "item": {"ports": "22022", "proto": "tcp", "setype": "ssh_port_t", "state": "present"}, "ports": ["22022"], "proto": "tcp", "setype": "ssh_port_t", "state": "present"} TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.540327", "end": "2020-03-04 19:53:52.854710", "rc": 0, "start": "2020-03-04 19:53:52.314383", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.582216", "end": "2020-03-04 19:53:53.801974", "rc": 0, "start": "2020-03-04 19:53:53.219758", "stderr": "", "stderr_lines": [], "stdout": "ssh_port_t tcp 22100, 22022", "stdout_lines": ["ssh_port_t tcp 22100, 22022"]} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.529535", "end": "2020-03-04 19:53:54.777841", "rc": 0, "start": "2020-03-04 19:53:54.248306", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.645274", "end": "2020-03-04 19:53:55.846504", "rc": 0, "start": "2020-03-04 19:53:55.201230", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after other changes] ****************************************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:33 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"port_after": "ssh_port_t tcp 22100, 22022"}, "changed": false} TASK [Check if there are SELinux port mapping changes] ************************* task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:37 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [revert subsequent changes] *********************************************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:41 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.344241", "end": "2020-03-04 19:54:06.511625", "rc": 0, "start": "2020-03-04 19:54:05.167384", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => (item={u'setype': u'ssh_port_t', u'proto': u'tcp', u'state': u'absent', u'ports': u'22022'}) => {"changed": true, "item": {"ports": "22022", "proto": "tcp", "setype": "ssh_port_t", "state": "absent"}, "ports": ["22022"], "proto": "tcp", "setype": "ssh_port_t", "state": "absent"} TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.535029", "end": "2020-03-04 19:54:10.751528", "rc": 0, "start": "2020-03-04 19:54:10.216499", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.546723", "end": "2020-03-04 19:54:11.624320", "rc": 0, "start": "2020-03-04 19:54:11.077597", "stderr": "", "stderr_lines": [], "stdout": "ssh_port_t tcp 22100", "stdout_lines": ["ssh_port_t tcp 22100"]} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.510588", "end": "2020-03-04 19:54:12.451885", "rc": 0, "start": "2020-03-04 19:54:11.941297", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.577778", "end": "2020-03-04 19:54:13.355909", "rc": 0, "start": "2020-03-04 19:54:12.778131", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [save state after reverting other changes] ******************************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:50 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"port_after": "ssh_port_t tcp 22100"}, "changed": false} TASK [Check if SELinux port mapping is as before] ****************************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:54 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:58 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": false}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : debug] ********************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:56 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {} TASK [selinux : Drop all local modifications] ********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:60 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux boolean local modifications] ***************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:66 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux file context local modifications] ************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:70 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Purge all SELinux port local modifications] ******************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:74 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-D"], "delta": "0:00:02.696217", "end": "2020-03-04 19:54:24.869836", "rc": 0, "start": "2020-03-04 19:54:22.173619", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Purge all SELinux login local modifications] ******************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:78 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Reload SELinux policy] ***************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:82 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["semodule", "-R"], "delta": "0:00:01.274212", "end": "2020-03-04 19:54:26.548358", "rc": 0, "start": "2020-03-04 19:54:25.274146", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [selinux : Set SELinux booleans] ****************************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:86 TASK [selinux : Set SELinux file contexts] ************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:93 TASK [selinux : Restore SELinux labels on filesystem tree] ********************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:102 TASK [selinux : Restore SELinux labels on filesystem tree in check mode] ******* task path: /tmp/tmphnxw_6h_/tasks/main.yml:108 TASK [selinux : Set an SELinux label on a port] ******************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:116 TASK [selinux : Set linux user to SELinux user mapping] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:124 TASK [Get local modifications - boolean] *************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:2 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "boolean", "-l", "-n", "-C"], "delta": "0:00:00.551893", "end": "2020-03-04 19:54:27.608924", "rc": 0, "start": "2020-03-04 19:54:27.057031", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - port] ****************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:5 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "port", "-l", "-n", "-C"], "delta": "0:00:00.583402", "end": "2020-03-04 19:54:28.611128", "rc": 0, "start": "2020-03-04 19:54:28.027726", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - login] ***************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:8 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "login", "-l", "-n", "-C"], "delta": "0:00:00.531032", "end": "2020-03-04 19:54:29.507087", "rc": 0, "start": "2020-03-04 19:54:28.976055", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get local modifications - fcontext] ************************************** task path: /tmp/tmphnxw_6h_/tests/set_selinux_variables.yml:11 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["/usr/sbin/semanage", "fcontext", "-l", "-n", "-C"], "delta": "0:00:00.588427", "end": "2020-03-04 19:54:30.486151", "rc": 0, "start": "2020-03-04 19:54:29.897724", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Check if there are no SELinux port mapping changes] ********************** task path: /tmp/tmphnxw_6h_/tests/tests_port.yml:64 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=50 changed=26 unreachable=0 failed=0 + cd /tmp/tmphnxw_6h_/tests; TEST_SUBJECTS=/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 TEST_ARTIFACTS=/tmp/linux-system-role-test-work-pull-linux-system-roles_selinux-48-605d328-fedora-30-44ywpqng/artifacts ansible-playbook -vv --inventory=/usr/share/ansible/inventory/standard-inventory-qcow2 /tmp/tmphnxw_6h_/_setup.yml /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml ansible-playbook 2.7.10 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] Using /etc/ansible/ansible.cfg as config file /usr/share/ansible/inventory/standard-inventory-qcow2 did not meet host_list requirements, check plugin documentation if this is unexpected PLAYBOOK: _setup.yml *********************************************************** 1 plays in /tmp/tmphnxw_6h_/_setup.yml PLAY [Fail when only localhost is available] *********************************** META: ran handlers TASK [debug] ******************************************************************* task path: /tmp/tmphnxw_6h_/_setup.yml:5 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "groups": { "all": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "localhost": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "subjects": [ "/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2" ], "ungrouped": [] } } TASK [fail] ******************************************************************** task path: /tmp/tmphnxw_6h_/_setup.yml:7 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=1 changed=0 unreachable=0 failed=0 PLAYBOOK: tests_selinux_disabled.yml ******************************************* 1 plays in /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml PLAY [Ensure the default is targeted, enforcing, without local modifications] *** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:2 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] META: ran handlers TASK [Install SELinux tool semanage on Fedora] ********************************* task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:16 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "msg": "", "rc": 0, "results": ["Installed: policycoreutils-python-utils", "Installed: python3-policycoreutils-2.9-4.fc30.noarch", "Installed: policycoreutils-python-utils-2.9-4.fc30.noarch", "Installed: policycoreutils-2.9-4.fc30.x86_64", "Removed: python3-policycoreutils-2.9-1.fc30.noarch", "Removed: policycoreutils-2.9-1.fc30.x86_64"]} TASK [Add a Linux System Roles SELinux User] *********************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:23 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "comment": "Linux System Roles SELinux User", "create_home": true, "group": 1001, "home": "/home/sar-user", "name": "sar-user", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1001} TASK [Add some mapping] ******************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:27 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": "echo -e -n \"boolean -m --on samba_enable_home_dirs\nport -a -p tcp -t ssh_port_t 22100\nfcontext -a -t user_home_dir_t /tmp/test_dir\nlogin -a -s staff_u sar-user\n\" | /usr/sbin/semanage -i -", "delta": "0:00:05.004098", "end": "2020-03-04 19:56:48.807641", "rc": 0, "start": "2020-03-04 19:56:43.803543", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Backup original /etc/selinux/config] ************************************* task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:29 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "checksum": "61a40e1faa78b234462d16dffbdb3fb869442406", "dest": "/etc/selinux/config.test_selinux_disabled", "gid": 0, "group": "root", "md5sum": "eab350e0c5241d4394c2099bf86e9312", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 548, "src": "/etc/selinux/config", "state": "file", "uid": 0} TASK [Upload testing /etc/selinux/config] ************************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:34 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "checksum": "385caf4e178c9a1dfcdaac71738934c735201480", "dest": "/etc/selinux/config", "gid": 0, "group": "root", "md5sum": "293160d55f3a26d5bc687154d028eb47", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 547, "src": "/root/.ansible/tmp/ansible-tmp-1583351809.45-168163544705321/source", "state": "file", "uid": 0} TASK [Switch to permissive to allow login when selinuxfs is not mounted] ******* task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:38 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["setenforce", "0"], "delta": "0:00:00.004021", "end": "2020-03-04 19:56:50.528873", "rc": 0, "start": "2020-03-04 19:56:50.524852", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Get selinuxfs mountpoint] ************************************************ task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:41 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": "findmnt -n -t selinuxfs --output=target", "delta": "0:00:00.010115", "end": "2020-03-04 19:56:50.907439", "rc": 0, "start": "2020-03-04 19:56:50.897324", "stderr": "", "stderr_lines": [], "stdout": "/sys/fs/selinux", "stdout_lines": ["/sys/fs/selinux"]} TASK [Umount /sys/fs/selinux to emulate SELinux disabled system] *************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:44 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["umount", "/sys/fs/selinux"], "delta": "0:00:00.006656", "end": "2020-03-04 19:56:51.262922", "rc": 0, "start": "2020-03-04 19:56:51.256266", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [include_role : selinux] ************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:49 TASK [selinux : Install SELinux python2 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:2 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Install SELinux python3 tools] ********************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:10 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: libselinux-python3", "Installed: policycoreutils-python3"]} TASK [selinux : refresh facts] ************************************************* task path: /tmp/tmphnxw_6h_/tasks/main.yml:18 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [selinux : Install SELinux tool semanage on Fedora] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:22 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "msg": "Nothing to do", "rc": 0, "results": ["Installed: policycoreutils-python-utils"]} TASK [selinux : Set permanent SELinux state if enabled] ************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:31 skipping: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [selinux : Set permanent SELinux state if disabled] *********************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:38 [WARNING]: Reboot is required to set SELinux state to enforcing changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "configfile": "/etc/selinux/config", "msg": "Config SELinux state changed from 'disabled' to 'enforcing'", "policy": "targeted", "reboot_required": true, "state": "enforcing"} TASK [selinux : Set ansible facts if needed] *********************************** task path: /tmp/tmphnxw_6h_/tasks/main.yml:45 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"selinux_reboot_required": true}, "changed": false} TASK [selinux : Fail if reboot is required] ************************************ task path: /tmp/tmphnxw_6h_/tasks/main.yml:51 fatal: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2]: FAILED! => {"changed": false, "msg": "Reboot is required to apply changes. Re-execute the role after boot."} TASK [examine the selinux_reboot_required variable] **************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:52 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"ansible_facts": {"test_selinux_reboot_required": true}, "changed": false} TASK [check that the role has failed and set the correct variable] ************* task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:56 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Mount /sys/fs/selinux back to system] ************************************ task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:60 [WARNING]: Consider using the mount module rather than running 'mount'. If you need to use command because mount is insufficient you can add 'warn: false' to this command task or set 'command_warnings=False' in ansible.cfg to get rid of this message. changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["mount", "-t", "selinuxfs", "selinuxfs", "/sys/fs/selinux"], "delta": "0:00:00.007338", "end": "2020-03-04 19:57:01.342040", "rc": 0, "start": "2020-03-04 19:57:01.334702", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Switch back to enforcing] ************************************************ task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:62 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "cmd": ["setenforce", "1"], "delta": "0:00:00.009152", "end": "2020-03-04 19:57:01.693017", "rc": 0, "start": "2020-03-04 19:57:01.683865", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [Gather facts again] ****************************************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:64 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] TASK [Check SELinux config mode] *********************************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:66 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => { "changed": false, "msg": "All assertions passed" } TASK [Restore original /etc/selinux/config] ************************************ task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:70 ok: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": false, "checksum": "61a40e1faa78b234462d16dffbdb3fb869442406", "dest": "/etc/selinux/config", "gid": 0, "group": "root", "md5sum": "eab350e0c5241d4394c2099bf86e9312", "mode": "0644", "owner": "root", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 548, "src": "/etc/selinux/config.test_selinux_disabled", "state": "file", "uid": 0} TASK [Remove /etc/selinux/config backup] *************************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:75 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "path": "/etc/selinux/config.test_selinux_disabled", "state": "absent"} TASK [Remove Linux System Roles SELinux User] ********************************** task path: /tmp/tmphnxw_6h_/tests/tests_selinux_disabled.yml:79 changed: [/cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2] => {"changed": true, "force": false, "name": "sar-user", "remove": true, "state": "absent"} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 : ok=24 changed=13 unreachable=0 failed=1