From 43ead739340d6beed894bb33c50ae5d4f202667b Mon Sep 17 00:00:00 2001 From: Luca Berton Date: Fri, 17 Dec 2021 14:33:18 +0100 Subject: [PATCH] Add RHEL8 library python3-libsemanage In modern systems (RHEL8+) with python3 default the library requirement is `python3-libsemanage`. Updated `libsemanage-python` to `python3-libsemanage`. --- changelogs/fragments/299_seboolean_python3.yml | 3 +++ plugins/modules/seboolean.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/299_seboolean_python3.yml diff --git a/changelogs/fragments/299_seboolean_python3.yml b/changelogs/fragments/299_seboolean_python3.yml new file mode 100644 index 0000000..5680d99 --- /dev/null +++ b/changelogs/fragments/299_seboolean_python3.yml @@ -0,0 +1,3 @@ +--- +bugfixes: +- seboolean - add ``python3-libsemanage`` package dependency for RHEL8+ systems. diff --git a/plugins/modules/seboolean.py b/plugins/modules/seboolean.py index ef1b8c6..f4d8cf4 100644 --- a/plugins/modules/seboolean.py +++ b/plugins/modules/seboolean.py @@ -40,6 +40,7 @@ notes: requirements: - libselinux-python - libsemanage-python +- python3-libsemanage author: - Stephen Fromm (@sfromm) ''' @@ -284,7 +285,7 @@ def main(): module.fail_json(msg=missing_required_lib('libselinux-python'), exception=SELINUX_IMP_ERR) if not HAVE_SEMANAGE: - module.fail_json(msg=missing_required_lib('libsemanage-python'), exception=SEMANAGE_IMP_ERR) + module.fail_json(msg=missing_required_lib('libsemanage-python or python3-libsemanage'), exception=SEMANAGE_IMP_ERR) ignore_selinux_state = module.params['ignore_selinux_state']