Merge OracleLinux in RedHat bootstrap-os (#5575)

* Merge OracleLinux in RedHat bootstrap-os

* Set default for use_oracle_public_repo in main.yaml
This commit is contained in:
Sander Cornelissen 2020-03-14 14:28:34 +01:00 committed by GitHub
parent d69db3469e
commit f5417032bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 25 deletions

View file

@ -9,6 +9,10 @@ centos_fastestmirror_enabled: false
# Disable locksmithd or leave it in its current state # Disable locksmithd or leave it in its current state
coreos_locksmithd_disable: false coreos_locksmithd_disable: false
## Oracle Linux specific variables
# Install public repo on Oracle Linux
use_oracle_public_repo: true
## General ## General
# Set the hostname to inventory_hostname # Set the hostname to inventory_hostname
override_system_hostname: true override_system_hostname: true

View file

@ -1,4 +1,27 @@
--- ---
# For Oracle Linux install public repo
- name: Download Oracle Linux public yum repo
get_url:
url: https://yum.oracle.com/public-yum-ol7.repo
dest: /etc/yum.repos.d/public-yum-ol7.repo
when:
- use_oracle_public_repo|default(true)
- '"Oracle" in os_release.stdout'
- name: Enable Oracle Linux repo
ini_file:
dest: /etc/yum.repos.d/public-yum-ol7.repo
section: "{{ item }}"
option: enabled
value: "1"
with_items:
- ol7_latest
- ol7_addons
- ol7_developer_EPEL
when:
- use_oracle_public_repo|default(true)
- '"Oracle" in os_release.stdout'
# CentOS ships with python installed # CentOS ships with python installed
- name: Check if this is an atomic host - name: Check if this is an atomic host

View file

@ -1,21 +0,0 @@
---
- name: Download Oracle Linux public yum repo
get_url:
url: https://yum.oracle.com/public-yum-ol7.repo
dest: /etc/yum.repos.d/public-yum-ol7.repo
- name: Enable Oracle Linux repo
ini_file:
dest: /etc/yum.repos.d/public-yum-ol7.repo
section: "{{ item }}"
option: enabled
value: "1"
with_items:
- ol7_latest
- ol7_addons
- ol7_developer_EPEL
- name: Install packages requirements for bootstrap
yum:
name: container-selinux
state: present

View file

@ -8,7 +8,7 @@
environment: {} environment: {}
- include_tasks: bootstrap-centos.yml - include_tasks: bootstrap-centos.yml
when: '"CentOS" in os_release.stdout or "Red Hat Enterprise Linux" in os_release.stdout' when: '"CentOS" in os_release.stdout or "Red Hat Enterprise Linux" in os_release.stdout or "Oracle" in os_release.stdout'
- include_tasks: bootstrap-clearlinux.yml - include_tasks: bootstrap-clearlinux.yml
when: '"Clear Linux OS" in os_release.stdout' when: '"Clear Linux OS" in os_release.stdout'
@ -25,9 +25,6 @@
- include_tasks: bootstrap-opensuse.yml - include_tasks: bootstrap-opensuse.yml
when: '"openSUSE" in os_release.stdout' when: '"openSUSE" in os_release.stdout'
- include_tasks: bootstrap-oracle.yml
when: '"Oracle" in os_release.stdout'
- name: Create remote_tmp for it is used by another module - name: Create remote_tmp for it is used by another module
file: file:
path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}" path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}"