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', '<='))