Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions tasks/install_for_redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,23 @@
changed_when: false
when: is_getenforce_exist.rc == 0

- name: set pythonlibs | CentOS 7 different name
set_fact:
pythonlibs: [ 'libsemanage-python', 'libselinux-python' ]
when: ansible_distribution_major_version < "8"

- name: set pythonlibs | CentOS 8 different name
set_fact:
pythonlibs: [ 'python3-libsemanage', 'python3-libselinux' ]
when: ansible_distribution_major_version >= "8"

- name: Redhat installation | ensure dependencies are installed
package:
name: "{{ item }}"
state: present
when: is_getenforce_exist.rc == 0 and sestatus is defined and "Enabled" in sestatus.stdout
with_items:
- libsemanage-python
- libselinux-python
- "{{ pythonlibs }}"
tags:
- rundeck
- install
Expand Down
12 changes: 11 additions & 1 deletion tests/default_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
raw: 'apt-get update && apt-get --no-install-recommends -yq install python python-apt'
when: ansible_os_family == "Ubuntu" or ansible_os_family == "Debian"

- name: set libsemanage | CentOS 7 different name
set_fact:
libsemanage: 'libsemanage-python'
when: ansible_distribution_major_version < "8"

- name: set libsemanage | CentOS 8 different name
set_fact:
libsemanage: 'python3-libsemanage'
when: ansible_distribution_major_version >= "8"

- name: test default values deployment
hosts: rundeck-servers
become: true
Expand All @@ -33,7 +43,7 @@
state: present
when: ansible_os_family == 'RedHat'
with_items:
- libselinux-python
- "{{ libsemanage }}"

roles: # checked out roles rather than installed via ansible galaxy.
- ansible-java-role
Expand Down