Closed chendelin1982 closed 2 years ago
# recommend
yum install oracle-epel-release-el8
yum install oracle-epel-release-el7
# Option
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# OL7
yum install oracle-softwarecollection-release-el7
# OL8
yum install scl-utils
why scl-utils is release-scl? refer to here
yum install oracle-software-release-el7
yum install oracle-software-release-el8
- name: Install repo for OracleLinux
shell: |
yum install oracle-epel-release-el{{ansible_distribution_major_version}}
yum install oracle-software-release-el{{ansible_distribution_major_version}}
when: ansible_distribution == 'OracleLinux'
- name: Install scl repo for OracleLinux7
shell: |
yum install oracle-softwarecollection-release-el7
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == 7
- name: Install scl repo for OracleLinux8
shell: |
yum install scl-utils
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == 8
shell module error on ansible,It's ok by shell. changeto yum module
- name: Install repo for OracleLinux
shell: |
yum install oracle-epel-release-el{{ansible_distribution_major_version}}
- name: Install epel repo for OracleLinux
yum:
name: oracle-epel-release-el{{ansible_distribution_major_version}}
when: ansible_distribution == 'OracleLinux'
codeing as following
- block:
- name: Install epel repo for OracleLinux
yum:
name: oracle-epel-release-el{{ansible_distribution_major_version}}
- name: Install scl repo for OracleLinux
yum:
name: scl-utils
when: ansible_distribution == 'OracleLinux'