Skip to content

Commit a541912

Browse files
bartowlRendanic
authored andcommitted
improve package handling for sles
1 parent 58f0a60 commit a541912

File tree

3 files changed

+82
-158
lines changed

3 files changed

+82
-158
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- "orahost: improve oracle os packages selection for Suse (oravirt#337)"

roles/orahost/defaults/main.yml

Lines changed: 58 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -245,158 +245,64 @@ oracle_packages:
245245

246246
# based on https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/database-installation-guide-linux.pdf
247247
oracle_packages_sles_multi:
248-
fallback:
249-
- ksh
250-
- binutils
251-
- gcc
252-
- gcc48
253-
- glibc
254-
- glibc-32bit
255-
- glibc-devel
256-
- glibc-devel-32bit
257-
- mksh
258-
- libaio1
259-
- libaio-devel
260-
- libcap1
261-
- libstdc++48-devel
262-
- libstdc++48-devel
263-
- libstdc++6
264-
- libstdc++6-32bit
265-
- libstdc++-devel
266-
- libstdc++-devel-32bit
267-
- libgcc_s1
268-
- libgcc_s1-32bit
269-
- lsof
270-
- make
271-
- sysstat
272-
- xorg-x11-driver-video
273-
- xorg-x11-server
274-
- xorg-x11-essentials
275-
- xorg-x11-Xvnc
276-
- xorg-x11-fonts-core
277-
- xorg-x11
278-
- xorg-x11-server-extra
279-
- xorg-x11-libs
280-
- xorg-x11-fonts
281-
v12: # Suse 12.x
282-
- bc
283-
- binutils
284-
- glibc
285-
- glibc-devel
286-
- libX11
287-
- libXau6
288-
- libXtst6
289-
- libcap-ng-utils
290-
- libcap-ng0
291-
- libcap-progs
292-
- libcap1
293-
- libcap2
294-
- libelf-devel
295-
- libgcc_s1
296-
- libjpeg-turbo
297-
- libjpeg62
298-
- libjpeg62-turbo
299-
- libpcap1
300-
- libpcre1
301-
- libpcre16-0
302-
- libpng16-16
303-
- libstdc++6
304-
- libtiff5
305-
- libaio-devel
306-
- libaio1
307-
- libXrender1
308-
- make
309-
- mksh
310-
- pixz
311-
- rdma-core
312-
- rdma-core-devel
313-
- smartmontools
314-
- sysstat
315-
- xorg-x11-libs
316-
- xz
317-
v15: # Suse 15.x
318-
- bc
319-
- binutils
320-
- glibc
321-
- glibc-devel
322-
- insserv-compat
323-
- libaio-devel
324-
- libaio1
325-
- libX11-6
326-
- libXau6
327-
- libXext-devel
328-
- libXext6
329-
- libXi-devel
330-
- libXi6
331-
- libXrender-devel
332-
- libXrender1
333-
- libXtst6
334-
- libcap-ng-utils
335-
- libcap-ng0
336-
- libcap-progs
337-
# - libcap1 # "No provider of '+libcap1' found."
338-
- libcap2
339-
- libelf1
340-
- libgcc_s1
341-
- libjpeg8
342-
- libpcap1
343-
- libpcre1
344-
- libpcre16-0
345-
- libpng16-16
346-
- libstdc++6
347-
- libtiff5
348-
- libgfortran4
349-
- mksh
350-
- make
351-
- pixz
352-
- rdma-core
353-
- rdma-core-devel
354-
- smartmontools
355-
- sysstat
356-
- xorg-x11-libs
357-
- xz
358-
v15.3:
359-
- compat-libpthread-nonshared # only difference to 15.x yet required - https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP3/index.html
360-
- bc
361-
- binutils
362-
- glibc
363-
- glibc-devel
364-
- insserv-compat
365-
- libaio-devel
366-
- libaio1
367-
- libX11-6
368-
- libXau6
369-
- libXext-devel
370-
- libXext6
371-
- libXi-devel
372-
- libXi6
373-
- libXrender-devel
374-
- libXrender1
375-
- libXtst6
376-
- libcap-ng-utils
377-
- libcap-ng0
378-
- libcap-progs
379-
# - libcap1 # "No provider of '+libcap1' found."
380-
- libcap2
381-
- libelf1
382-
- libgcc_s1
383-
- libjpeg8
384-
- libpcap1
385-
- libpcre1
386-
- libpcre16-0
387-
- libpng16-16
388-
- libstdc++6
389-
- libtiff5
390-
- libgfortran4
391-
- mksh
392-
- make
393-
- pixz
394-
- rdma-core
395-
- rdma-core-devel
396-
- smartmontools
397-
- sysstat
398-
- xorg-x11-libs
399-
- xz
248+
- name: SLES common packages
249+
condition: true
250+
packages:
251+
- bc
252+
- binutils
253+
- glibc
254+
- glibc-devel
255+
- libaio-devel
256+
- libaio1
257+
- libcap-ng-utils
258+
- libcap-ng0
259+
- libcap-progs
260+
- libcap2
261+
- libgcc_s1
262+
- libpcap1
263+
- libpcre1
264+
- libpcre16-0
265+
- libpng16-16
266+
- libstdc++6
267+
- libtiff5
268+
- libXau6
269+
- libXrender1
270+
- libXtst6
271+
- make
272+
- mksh
273+
- pixz
274+
- rdma-core
275+
- rdma-core-devel
276+
- smartmontools
277+
- sysstat
278+
- xorg-x11-libs
279+
- xz
280+
- name: SLES 12 packages
281+
condition: "{{ ansible_distribution_major_version == '12' }}"
282+
packages:
283+
- libcap1
284+
- libelf-devel
285+
- libjpeg-turbo
286+
- libjpeg62
287+
- libjpeg62-turbo
288+
- libX11
289+
- name: SLES 15 packages
290+
condition: "{{ ansible_distribution_major_version == '15' }}"
291+
packages:
292+
- insserv-compat
293+
- libelf1
294+
- libgfortran4
295+
- libjpeg8
296+
- libX11-6
297+
- libXext-devel
298+
- libXext6
299+
- libXi-devel
300+
- libXi6
301+
- libXrender-devel
302+
- name: "SLES 15 SP3+ extra packages"
303+
condition: "{{ ansible_distribution_version is version('15.3', 'ge') }}"
304+
packages:
305+
- compat-libpthread-nonshared # only difference to 15.2 yet required - https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP3/index.html
400306

401307
oracle_asm_packages:
402308
- "{{ asmlib_rpm }}"

roles/orahost/tasks/main.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,29 @@
2222
- ansible_distribution_major_version is version('7', '<=')
2323
tags: os_packages, oscheck
2424

25-
- name: Install packages required by Oracle on SLES
25+
- name: Install custom packages required by Oracle on SLES (oracle_packages_sles)
2626
community.general.packaging.os.zypper:
27-
name: "{{ oracle_packages_sles
28-
| default(oracle_packages_sles_multi['v' + ansible_distribution_version])
29-
| default(oracle_packages_sles_multi['v' + ansible_distribution_major_version])
30-
| default(oracle_packages_sles_multi['fallback']) }}"
27+
name: "{{ oracle_packages_sles }}"
3128
state: installed
32-
when: install_os_packages and ansible_os_family == 'Suse'
29+
when:
30+
- oracle_packages_sles is defined
31+
- install_os_packages
32+
- ansible_os_family == 'Suse'
33+
tags: os_packages, oscheck
34+
35+
- name: Install default packages required by Oracle on SLES (version dependant)
36+
community.general.packaging.os.zypper:
37+
name: "{{ item.packages }}"
38+
state: installed
39+
with_items:
40+
- "{{ oracle_packages_sles_multi }}"
41+
loop_control:
42+
label: "{{ item.name | default('') }}"
43+
when:
44+
- not oracle_packages_sles is defined
45+
- install_os_packages
46+
- ansible_os_family == 'Suse'
47+
- item.condition | default(false)
3348
tags: os_packages, oscheck
3449

3550
- name: Install packages required by Oracle for ASMlib on OL/RHEL

0 commit comments

Comments
 (0)