Skip to content

Commit

Permalink
Debug python3 xenial
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Sep 3, 2024
1 parent 9c8b5ca commit 5172f08
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/ansible-playbooks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
raw: |
if [ -f /etc/lsb-release ]; then
if grep -q -i -E "ubuntu.*16" /etc/lsb-release; then
add-apt-repository -y ppa:jblgf0/python
apt-get update
apt-get install -y python3.6 python3-apt
ln -sf /usr/bin/python3.6 /usr/bin/python3
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
cd /usr/lib/python3/dist-packages
sudo ln -s apt_inst.cpython-35m-x86_64-linux-gnu.so apt_inst.so
sudo ln -s apt_pkg.cpython-35m-x86_64-linux-gnu.so apt_pkg.so
fi
fi
Expand Down Expand Up @@ -111,6 +111,13 @@
- ansible_os_family == 'Debian'
- ansible_distribution == "Ubuntu"
- ansible_distribution_release == "jammy"

- name: Change Python link Ubuntu Xenial
command: ln -sf /usr/local/bin/python3.8 /usr/bin/python3
when:
- ansible_pkg_mgr == "apt"
- ansible_distribution == "Ubuntu"
- ansible_distribution_release == "xenial"

# ---------------------------------------------------------------------
# Pip installation ----------------------------------------------------
Expand All @@ -126,7 +133,7 @@
when:
- ansible_os_family == 'Debian'
- stat_pip3.stat.exists == False
- ansible_distribution_release not in ['bionic', 'xenial']
- ansible_distribution_release not in ['bionic']

- name: Install pip Ubuntu Bionic/Xenial
ansible.builtin.package:
Expand All @@ -137,7 +144,7 @@
when:
- ansible_os_family == 'Debian'
- ansible_distribution == "Ubuntu"
- ansible_distribution_release in ['bionic', 'xenial']
- ansible_distribution_release in ['bionic']

when:
- install_python is defined
Expand Down

0 comments on commit 5172f08

Please sign in to comment.