Skip to content

Commit be6c514

Browse files
authored
Merge pull request #249 from Rendanic/patch5
OL8: Bugfix for RPM-Repos + asmlib
2 parents c57716f + d7ab216 commit be6c514

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

roles/orahost/defaults/main.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,44 @@
4848
keyfile: /tmp/known_hosts
4949

5050
# Extra repositories that should be enabled
51-
extrarepos_enabled:
51+
extrarepos_enabled: "{%- if ansible_distribution == 'OracleLinux' -%}
52+
ol{{ ansible_distribution_major_version }}_addons
53+
{%- else -%}
54+
{%- endif %}"
5255
extrarepos_disabled:
5356

54-
#epel_rpm: "http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
55-
asmlib_rpm: "{% if ansible_distribution_major_version|int==6%}{{asmlib_rpm_el6}}{%elif ansible_distribution_major_version|int==7 %}{{asmlib_rpm_el7}}{% else %}None{% endif %}"
56-
asmlibsupport_rpm: "{% if ansible_os_family == 'RedHat' %}{% if ansible_distribution_major_version|int==6%}{{asmlibsupport_rpm_el6}}{%elif ansible_distribution_major_version|int==7 %}{{asmlibsupport_rpm_el7}}{% else %}oracleasm-support{% endif %}{% else %}oracleasm-support{% endif %}"
57+
# Install oracleasm-support from RPM-Repo on OracleLinux
58+
asmlib_rpm: "{%- if ansible_distribution_major_version|int == 6 %}
59+
{{ asmlib_rpm_el6 }}
60+
{%- elif ansible_distribution_major_version|int ==7 %}
61+
{{ asmlib_rpm_el7 }}
62+
{%- elif ansible_distribution_major_version|int ==8 %}
63+
{{ asmlib_rpm_el8 }}
64+
{%- else %}
65+
None
66+
{%- endif %}"
67+
68+
asmlibsupport_rpm: "{%- if ansible_distribution == 'OracleLinux' -%}
69+
oracleasm-support
70+
{%- else -%}
71+
{%- if ansible_distribution_major_version|int == 6 -%}
72+
{{asmlibsupport_rpm_el6}}
73+
{%- elif ansible_distribution_major_version|int == 7 -%}
74+
{{asmlibsupport_rpm_el7}}
75+
{%- elif ansible_distribution_major_version|int == 8 -%}
76+
{{asmlibsupport_rpm_el8}}
77+
{%- else -%}
78+
oracleasm-support
79+
{%- endif -%}
80+
{%- endif -%}"
81+
5782
asmlib_rpm_el6: "http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm"
5883
asmlib_rpm_el7: "http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el7.x86_64.rpm"
84+
asmlib_rpm_el8: "https://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.17-1.el8.x86_64.rpm"
5985
asmlib_rpm_sles: "http://oss.oracle.com/projects/oracleasm-support/dist/files/RPMS/sles12/amd64/2.1.8/oracleasm-support-2.1.8-1.SLE12.x86_64.rpm"
6086
asmlibsupport_rpm_el6: "http://oss.oracle.com/projects/oracleasm-support/dist/files/RPMS/rhel6/amd64/2.1.8/oracleasm-support-2.1.8-1.el6.x86_64.rpm"
6187
asmlibsupport_rpm_el7: "https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasm-support-2.1.11-2.el7.x86_64.rpm"
62-
# asmlibsupport_rpm_el7: "http://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasm-support-2.1.8-3.el7.x86_64.rpm"
88+
asmlibsupport_rpm_el8: "https://yum.oracle.com/repo/OracleLinux/OL8/latest/x86_64/getPackage/oracleasm-support-2.1.11-2.el8.x86_64.rpm"
6389

6490
#ol6_repo_file: public-yum-ol6.repo
6591
repo_dir: /etc/yum.repos.d/

roles/orahost/tasks/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
state: installed
3434
enablerepo: "{{ extrarepos_enabled |default (omit, True) }}"
3535
disablerepo: "{{ extrarepos_disabled |default (omit, True) }}"
36-
when: install_os_packages and device_persistence == 'asmlib' and ansible_os_family == 'RedHat' and asm_diskgroups is defined
36+
when:
37+
- install_os_packages | bool
38+
- ansible_os_family == 'RedHat'
39+
- device_persistence == 'asmlib'
40+
- asm_diskgroups is defined
3741
tags: os_packages, oscheck
3842

3943
- name: Install packages required by Oracle for ASMlib on SLES

0 commit comments

Comments
 (0)