From 877cff8d0c7707b8675ca32ed4f372be28dddce9 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Mon, 5 Apr 2021 00:21:54 -0500 Subject: [PATCH] hardening: +centos/fedora task files --- roles/hardening/tasks/centos-selinux.yml | 13 +++++++++++++ roles/hardening/tasks/fedora-selinux.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 roles/hardening/tasks/centos-selinux.yml create mode 100644 roles/hardening/tasks/fedora-selinux.yml diff --git a/roles/hardening/tasks/centos-selinux.yml b/roles/hardening/tasks/centos-selinux.yml new file mode 100644 index 000000000..2b3a4e2 --- /dev/null +++ b/roles/hardening/tasks/centos-selinux.yml @@ -0,0 +1,13 @@ +--- + +- name: Install required dependency libsemanage-python + yum: + name: libsemanage-python + state: latest + when: (ansible_distribution_major_version is version('7', '=')) + +- name: Install required dependency python3-policycoreutils + dnf: + name: python3-policycoreutils + state: latest + when: (ansible_distribution_major_version is version('8', '>=')) diff --git a/roles/hardening/tasks/fedora-selinux.yml b/roles/hardening/tasks/fedora-selinux.yml new file mode 100644 index 000000000..6a91c6e --- /dev/null +++ b/roles/hardening/tasks/fedora-selinux.yml @@ -0,0 +1,13 @@ +--- + +- name: Install required dependency python3-libsemanage + dnf: + name: python3-libsemanage + state: latest + when: (ansible_distribution_major_version is version('31', '>=')) + +- name: Install required dependency libsemanage-python + dnf: + name: libsemanage-python + state: latest + when: (ansible_distribution_major_version is version('30', '<='))