2021-04-01 20:37:45 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: If selinux is not disabled
|
2021-04-01 20:37:45 +08:00
|
|
|
when: ansible_facts['selinux']['status'] == 'enabled'
|
|
|
|
block:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Install policycoreutils-python
|
|
|
|
ansible.builtin.package:
|
2021-04-01 20:37:45 +08:00
|
|
|
name: policycoreutils-python
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
when: ansible_facts['distribution_major_version'] == '7'
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Install python3-policycoreutils on RHEL 8
|
|
|
|
ansible.builtin.package:
|
2021-04-01 20:37:45 +08:00
|
|
|
name: python3-policycoreutils
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
when:
|
|
|
|
- inventory_hostname in groups.get(nfs_group_name, [])
|
|
|
|
or inventory_hostname in groups.get(rgwloadbalancer_group_name, [])
|
|
|
|
- ansible_facts['distribution_major_version'] == '8'
|