Oracle Linux 8 support and fixes (#6198)

* Add oraclelinux8 and disable firewalld

Add oraclelinux8 image and disable firewalld on oraclelinux VMs

* Fix Oracle Linux repositories

As documented in: http://yum.oracle.com/getting-started.html#installing-software-from-oracle-linux-yum-server
public-yum-ol7.repo was deprecated on release 7.6. Some repos were integrated into oracle-linux-ol7.repo (i.e.: ol7_latest, ol7_addons) and other are available as packages (epel). This also adds support for oraclelinux8

* Fix to use ansible_distribution_version

Instead of ansible_distribution_major_version

* Update README.md
This commit is contained in:
marcosfsch
2020-06-12 05:59:56 -03:00
committed by GitHub
parent a9de6dde33
commit 8dc01df60b
3 changed files with 35 additions and 7 deletions

View File

@@ -1,4 +1,9 @@
---
- name: Gather host facts to get ansible_distribution_version ansible_distribution_major_version
setup:
gather_subset: '!all'
filter: ansible_distribution_*version
# For Oracle Linux install public repo
- name: Download Oracle Linux public yum repo
get_url:
@@ -7,6 +12,7 @@
when:
- use_oracle_public_repo|default(true)
- '"Oracle" in os_release.stdout'
- (ansible_distribution_version | float) < 7.6
- name: Enable Oracle Linux repo
ini_file:
@@ -21,6 +27,27 @@
when:
- use_oracle_public_repo|default(true)
- '"Oracle" in os_release.stdout'
- (ansible_distribution_version | float) < 7.6
- name: Enable Oracle Linux repo
ini_file:
dest: "/etc/yum.repos.d/oracle-linux-ol{{ ansible_distribution_major_version }}.repo"
section: "{{ item }}"
option: enabled
value: "1"
with_items:
- "ol{{ ansible_distribution_major_version }}_addons"
when:
- '"Oracle" in os_release.stdout'
- (ansible_distribution_version | float) >= 7.6
- name: Install EPEL for Oracle Linux repo package
package:
name: "oracle-epel-release-el{{ ansible_distribution_major_version }}"
state: present
when:
- '"Oracle" in os_release.stdout'
- (ansible_distribution_version | float) >= 7.6
# CentOS ships with python installed
@@ -51,11 +78,6 @@
no_extra_spaces: true
become: true
- name: Gather host facts to get ansible_distribution_major_version
setup:
gather_subset: '!all'
filter: ansible_distribution_major_version
# 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