summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2024-07-29 18:58:54 +0200
committerGitHub <noreply@github.com>2024-07-29 18:58:54 +0200
commitd23a2de5f249727e70c1b45c3b22dc1dee7c5865 (patch)
tree314464c5752ae3fa8def7b30e4aecbac3be728d8
parentdnf/setup_rpm_repo: simplify dummy testing repos (#83624) (diff)
downloadansible-d23a2de5f249727e70c1b45c3b22dc1dee7c5865.tar.xz
ansible-d23a2de5f249727e70c1b45c3b22dc1dee7c5865.zip
Remove selinux import (#83674)
Remove selinux import which was kept for backward compatibility Fixes: #83657 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
-rw-r--r--changelogs/fragments/selinux_import.yml3
-rw-r--r--lib/ansible/module_utils/common/file.py6
2 files changed, 3 insertions, 6 deletions
diff --git a/changelogs/fragments/selinux_import.yml b/changelogs/fragments/selinux_import.yml
new file mode 100644
index 0000000000..881e41959e
--- /dev/null
+++ b/changelogs/fragments/selinux_import.yml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - remove extraneous selinux import (https://github.com/ansible/ansible/issues/83657).
diff --git a/lib/ansible/module_utils/common/file.py b/lib/ansible/module_utils/common/file.py
index b62e4c64f5..1b976fd932 100644
--- a/lib/ansible/module_utils/common/file.py
+++ b/lib/ansible/module_utils/common/file.py
@@ -7,12 +7,6 @@ import os
import stat
import re
-try:
- import selinux # pylint: disable=unused-import
- HAVE_SELINUX = True
-except ImportError:
- HAVE_SELINUX = False
-
FILE_ATTRIBUTES = {
'A': 'noatime',