Skip to content

Commit

Permalink
Fix ubuntu 20
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jul 3, 2020
1 parent 28c5de3 commit 6b046f4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions contextualization/conf-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b046f4

Please sign in to comment.