mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
updated for rh9
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
5ce4b873d7
commit
9368c1e17e
1 changed files with 5 additions and 35 deletions
|
|
@ -1,38 +1,8 @@
|
|||
---
|
||||
|
||||
- name: "PREREQ | Add the required packages | Python 3"
|
||||
block:
|
||||
- name: Check if python36-rpm package installed
|
||||
shell: rpm -q python36-rpm
|
||||
args:
|
||||
warn: false
|
||||
failed_when: ( python36_rpm_present.rc not in [ 0, 1 ] )
|
||||
changed_when: false
|
||||
register: python36_rpm_present
|
||||
|
||||
- name: Add the EPEL repository required for the python36-rpm pkg
|
||||
package:
|
||||
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
state: present
|
||||
register: epel_installed
|
||||
when:
|
||||
- python36_rpm_present.rc != '0'
|
||||
|
||||
- name: "PREREQ | Check required packages installed | Python3 "
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
register: python3reqs_installed
|
||||
loop:
|
||||
- python36-rpm
|
||||
- libselinux-python3
|
||||
|
||||
- name: Disable Epel repo if installed earlier
|
||||
shell: yum-config-manager disable epel
|
||||
args:
|
||||
warn: false
|
||||
when: epel_installed.changed
|
||||
- name: "PREREQ | If required install libselinux package to manage file changes."
|
||||
package:
|
||||
name: libselinux-python3
|
||||
state: present
|
||||
when:
|
||||
- ( ansible_python.version.major == 3 and ansible_python.version.minor == 6 )
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ python2_bin }}"
|
||||
- '"libselinux-python3" not in ansible_facts.packages'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue