From 6b046f40be13c0ea0c59f1e338dbe77c2c877559 Mon Sep 17 00:00:00 2001 From: micafer Date: Fri, 3 Jul 2020 11:47:19 +0200 Subject: [PATCH] Fix ubuntu 20 --- contextualization/conf-ansible.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/contextualization/conf-ansible.yml b/contextualization/conf-ansible.yml index 07bb6d6dc..671dea117 100644 --- a/contextualization/conf-ansible.yml +++ b/contextualization/conf-ansible.yml @@ -68,17 +68,18 @@ ################### Install Ansible/pip requisites ######################### - - name: Make sure universe repository is enabled in Ubuntu 20+ - apt_repository: - repo: deb http://archive.ubuntu.com/ubuntu {{ansible_distribution_release}} universe - state: present - update_cache: True - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 20 - - name: Debian/Ubuntu install requisites with apt - apt: name=python-pip,python-setuptools,sshpass,openssh-client,unzip install_recommends=no + apt: name=curl,python-setuptools,sshpass,openssh-client,unzip install_recommends=no when: ansible_os_family == "Debian" + - name: Debian/Ubuntu install python-pip with apt + apt: name=python-pip install_recommends=no + when: ansible_os_family == "Debian" and not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 20) + + - name: Install pip in in Ubuntu 20+ + command: curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 20 + - name: Ubuntu 14 extra packages needed apt: name=gcc,python-dev,libffi-dev,libssl-dev install_recommends=no when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int <= 14