diff --git a/roles/bootstrap-os/tasks/centos.yml b/roles/bootstrap-os/tasks/centos.yml index 93816ff2f..a113c573d 100644 --- a/roles/bootstrap-os/tasks/centos.yml +++ b/roles/bootstrap-os/tasks/centos.yml @@ -108,11 +108,3 @@ when: - fastestmirror.stat.exists - not centos_fastestmirror_enabled - -# libselinux-python is required on SELinux enabled hosts -# See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements -- name: Install libselinux python package - package: - name: "{{ ((ansible_distribution_major_version | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}" - state: present - become: true diff --git a/roles/bootstrap-os/tasks/rhel.yml b/roles/bootstrap-os/tasks/rhel.yml index 4e82cd088..adfbb1a7f 100644 --- a/roles/bootstrap-os/tasks/rhel.yml +++ b/roles/bootstrap-os/tasks/rhel.yml @@ -93,11 +93,3 @@ when: - fastestmirror.stat.exists - not centos_fastestmirror_enabled - -# libselinux-python is required on SELinux enabled hosts -# See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements -- name: Install libselinux python package - package: - name: "{{ ((ansible_distribution_major_version | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}" - state: present - become: true diff --git a/roles/system_packages/vars/main.yml b/roles/system_packages/vars/main.yml index cd1c99267..a038fbbac 100644 --- a/roles/system_packages/vars/main.yml +++ b/roles/system_packages/vars/main.yml @@ -58,7 +58,7 @@ pkgs: libseccomp2: - "{{ ansible_os_family in ['Debian', 'Suse'] }}" - "{{ 'k8s_cluster' in group_names }}" - libselinux-python: # TODO: Handle rehat_family + major < 8 + libselinux-python: - "{{ ansible_distribution == 'Amazon' }}" libselinux-python3: - "{{ ansible_distribution == 'Fedora' }}"