From 640bc8d9ec928c3189bdf8ff78d77b85959a61e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 23 Sep 2020 15:36:06 +0200 Subject: [PATCH] Manage SSL lib until Debian Stretch or Ubuntu Xenial Fix #2 --- CHANGELOG.md | 1 + defaults/main.yml | 11 ++++++++++- tasks/main.yml | 18 +++++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de1c402..8ec54a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Skip "Ensure to remove OpenManage related packages if requested" when it's not install (with package facts). * Repositories for Debian Jessie and Ubuntu Trusty won't need modifications with new OS versions. * Add support for Debian Buster and (not tested) Ubuntu Bionic. +* Manage SSL lib until Debian Stretch or Ubuntu Xenial (fix #2). ## v1.2.0 diff --git a/defaults/main.yml b/defaults/main.yml index e1df518..a7a2704 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -87,7 +87,6 @@ openmanage__dep_packages: # List of base packages to install. # openmanage__base_packages: - - 'libssl1.0.0' - 'srvadmin-base' - 'srvadmin-idracadm7' - 'srvadmin-idracadm8' @@ -98,6 +97,16 @@ openmanage__base_packages: - 'srvadmin-server-snmp' - 'srvadmin-storageservices' # ]]] +# .. envvar:: openmanage__ssl_packages [[[ +# +# List of SSL related packages to install. +# +# Required until Debian Stretch and Ubuntu Xenial +# to fix some dependencies +# +openmanage__ssl_packages: + - 'libssl1.0.0' + # ]]] # .. envvar:: openmanage__webgui_state [[[ # # What is the desired state for web interface of OMSA ? Possible options : diff --git a/tasks/main.yml b/tasks/main.yml index 292e99f..c76b2a7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -56,6 +56,20 @@ until: pkg_dep_result is success when: (openmanage__deploy_state == "present") +## Manage SSL packages +- name: Ensure SSL required packages are present + package: + name: '{{ item }}' + state: "present" + install_recommends: '{{ openmanage__install_recommends | bool }}' + with_flattened: + - '{{ openmanage__ssl_packages | to_nice_json }}' + register: pkg_ssl_result + until: pkg_ssl_result is success + when: (openmanage__deploy_state == "present" and + ( (ansible_distribution == "Debian" and ansible_distribution_major_version is version("9", "<=")) or + (ansible_distribution == "Ubuntu" and ansible_distribution_version is version("16.04", "<="))) + ## Manage base system packages - name: Ensure base packages are in there desired state package: @@ -110,7 +124,9 @@ src: "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2" path: "/opt/dell/srvadmin/lib64/libssl.so" state: link - when: (openmanage__deploy_state == "present") + when: (openmanage__deploy_state == "present" and + ( (ansible_distribution == "Debian" and ansible_distribution_major_version is version("9", "<=")) or + (ansible_distribution == "Ubuntu" and ansible_distribution_version is version("16.04", "<="))) ## Manage symlinks for OpenManage/racadm apps - name: Ensure some Executables are in PATH