Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing packages on RHEL family to allow SElinux works correctly. #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
48 changes: 27 additions & 21 deletions tasks/repo-RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
---

- block:

- name: Install epel-release on CentOS
yum:
name: epel-release
state: present
when: ansible_distribution in [ 'CentOS', 'Rocky', 'AlmaLinux' ]

- name: Install epel-release on RHEL
package:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
state: present
when: ansible_distribution in [ 'RedHat' ]

- name: Install epel-release and hostname on OracleLinux
package:
name:
- "oracle-epel-release-el{{ ansible_distribution_major_version }}"
- hostname
state: present
when: ansible_distribution in [ 'OracleLinux' ]
- name: Install epel-release on CentOS
yum:
name: epel-release
state: present
when: ansible_distribution in [ 'CentOS', 'Rocky', 'AlmaLinux' ]

- name: Install epel-release on RHEL
package:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
state: present
when: ansible_distribution in [ 'RedHat' ]

- name: Install epel-release and hostname on OracleLinux
package:
name:
- "oracle-epel-release-el{{ ansible_distribution_major_version }}"
- hostname
state: present
when: ansible_distribution in [ 'OracleLinux' ]

when: pdns_install_epel

Expand All @@ -32,6 +30,14 @@
- ansible_distribution in [ 'CentOS', 'Rocky', 'AlmaLinux' ]
- ansible_distribution_major_version | int < 8

- name: Install policycoreutils-python-utils to manage an SELinux environment.
package:
name: policycoreutils-python-utils
state: present
when:
- ansible_distribution in [ 'RedHat' 'CentOS', 'Rocky', 'AlmaLinux' ]
- ansible_distribution_major_version | int > 9

- name: Add the PowerDNS YUM Repository
yum_repository:
name: "{{ pdns_install_repo['name'] }}"
Expand Down