Browse Source

Fix Oracle yum disabled repository file after EPEL install (#7639)

pull/7647/head v2.16.0
Florian Ruynat 3 years ago
committed by GitHub
parent
commit
bcf695913f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 9 deletions
  1. 19
      roles/bootstrap-os/tasks/bootstrap-centos.yml

19
roles/bootstrap-os/tasks/bootstrap-centos.yml

@ -41,6 +41,15 @@
- '''ID="ol"'' in os_release.stdout_lines'
- (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:
- use_oracle_public_repo|default(true)
- '''ID="ol"'' in os_release.stdout_lines'
- (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"
@ -48,6 +57,7 @@
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- { option: "name", value: "ol{{ ansible_distribution_major_version }}_addons" }
- { option: "enabled", value: "1" }
- { option: "baseurl", value: "http://yum.oracle.com/repo/OracleLinux/OL{{ ansible_distribution_major_version }}/addons/x86_64/" }
when:
@ -55,15 +65,6 @@
- '''ID="ol"'' in os_release.stdout_lines'
- (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:
- use_oracle_public_repo|default(true)
- '''ID="ol"'' in os_release.stdout_lines'
- (ansible_distribution_version | float) >= 7.6
# CentOS ships with python installed
- name: Check presence of fastestmirror.conf

Loading…
Cancel
Save