From 7af5e6732da71c7a190a31ea2828c6724e0d5e7c Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 21 Oct 2019 15:36:02 +0530 Subject: [PATCH] fix: setup libssl dependancy by checking distribution --- playbooks/install.py | 2 +- playbooks/roles/common/tasks/debian.yml | 5 +++++ playbooks/roles/common/tasks/debian_family.yml | 1 - playbooks/roles/common/tasks/ubuntu.yml | 13 +++++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/playbooks/install.py b/playbooks/install.py index ecabd422..283af24f 100644 --- a/playbooks/install.py +++ b/playbooks/install.py @@ -14,7 +14,7 @@ def install_bench(args): success = run_os_command({ 'apt-get': [ 'sudo apt-get update', - 'sudo apt-get install -y git build-essential python3-setuptools python3-dev libffi-dev libssl-dev' + 'sudo apt-get install -y git build-essential python3-setuptools python3-dev libffi-dev' ], 'yum': [ 'sudo yum groupinstall -y "Development tools"', diff --git a/playbooks/roles/common/tasks/debian.yml b/playbooks/roles/common/tasks/debian.yml index 29372a7c..8aa2555c 100644 --- a/playbooks/roles/common/tasks/debian.yml +++ b/playbooks/roles/common/tasks/debian.yml @@ -21,4 +21,9 @@ - tk8.5-dev when: ansible_distribution_version | version_compare('8', 'ge') +- name: install pdf prerequisites debian + apt: pkg={{ item }} state=present force=yes + with_items: + - libssl-dev + ... \ No newline at end of file diff --git a/playbooks/roles/common/tasks/debian_family.yml b/playbooks/roles/common/tasks/debian_family.yml index 893b0632..1fd90fcd 100644 --- a/playbooks/roles/common/tasks/debian_family.yml +++ b/playbooks/roles/common/tasks/debian_family.yml @@ -12,7 +12,6 @@ - libcrypto++-dev - libfreetype6-dev - liblcms2-dev - - libssl-dev - libwebp-dev - libxext6 - libxrender1 diff --git a/playbooks/roles/common/tasks/ubuntu.yml b/playbooks/roles/common/tasks/ubuntu.yml index 13fb7450..cef4ac23 100644 --- a/playbooks/roles/common/tasks/ubuntu.yml +++ b/playbooks/roles/common/tasks/ubuntu.yml @@ -18,4 +18,17 @@ - tk8.6-dev when: ansible_distribution_version | version_compare('14.04', 'ge') + +- name: install pdf prerequisites for Ubuntu < 16.04 + apt: pkg={{ item }} state=present force=yes + with_items: + - libssl-dev + when: ansible_distribution_version | version_compare('16.04', 'lt') + +- name: install pdf prerequisites for Ubuntu >= 18.04 + apt: pkg={{ item }} state=present force=yes + with_items: + - libssl1.0-dev + when: ansible_distribution_version | version_compare('18.04', 'ge') + ... \ No newline at end of file