You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Set SELinux state
ansible.posix.selinux:
state: disabled
triggers the following error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: module 'selinux' has no attribute 'selinux_getpolicytype'
fatal: [linadm.ts.infn.it]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 107, in <module>\n File \"<stdin>\", line 99, in _ansiballz_main\n File \"<stdin>\", line 47, in invoke_module\n File \"<frozen runpy>\", line 226, in run_module\n File \"<frozen runpy>\", line 98, in _run_module_code\n File \"<frozen runpy>\", line 88, in _run_code\n File \"/tmp/ansible_ansible.posix.selinux_payload_8fkxu1fj/ansible_ansible.posix.selinux_payload.zip/ansible_collections/ansible/posix/plugins/modules/selinux.py\", line 346, in <module>\n File \"/tmp/ansible_ansible.posix.selinux_payload_8fkxu1fj/ansible_ansible.posix.selinux_payload.zip/ansible_collections/ansible/posix/plugins/modules/selinux.py\", line 248, in main\nAttributeError: module 'selinux' has no attribute 'selinux_getpolicytype'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
The same happens if I try to set the "policy: targeted" attribute instead of the state attribute.
# cat /etc/oracle-release
Oracle Linux Server release 9.2
##### STEPS TO REPRODUCE
See above
##### EXPECTED RESULTS
The task should set the selinux state without errors.
ACTUAL RESULTS
See above
The text was updated successfully, but these errors were encountered:
SUMMARY
The following task:
triggers the following error:
The same happens if I try to set the "policy: targeted" attribute instead of the state attribute.
ISSUE TYPE
COMPONENT NAME
ansible.posix.selinux
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
ACTUAL RESULTS
See above
The text was updated successfully, but these errors were encountered: