From 1c5ac61965aa38ce32ec4ec22977f17bc411b669 Mon Sep 17 00:00:00 2001 From: Rebecca Sutton Koeser Date: Tue, 12 Dec 2023 12:08:05 -0500 Subject: [PATCH] Adjust steps that are failing on bionic VMs (#167) * Adjust steps that are failing on bionic VMs * Conditionally turn off more update cache calls for bionic --- roles/build_dependencies/tasks/main.yml | 4 +++- roles/postgresql/tasks/main.yml | 4 +++- roles/python/tasks/install_dependencies.yml | 2 +- roles/python/tasks/install_python.yml | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/build_dependencies/tasks/main.yml b/roles/build_dependencies/tasks/main.yml index c7b4c323..60c14cd9 100644 --- a/roles/build_dependencies/tasks/main.yml +++ b/roles/build_dependencies/tasks/main.yml @@ -16,7 +16,9 @@ apt: name: "{{ common_dependencies + app_dependencies }}" state: present - update_cache: true + # update cache fails on bionic because postgres no longer has a release + # only update cache on newer VMs; skip updating on older vms + update_cache: "{{ ansible_distribution_version != '18.04' }}" changed_when: false when: ansible_distribution == 'Ubuntu' diff --git a/roles/postgresql/tasks/main.yml b/roles/postgresql/tasks/main.yml index b3e065ff..a42a9c44 100644 --- a/roles/postgresql/tasks/main.yml +++ b/roles/postgresql/tasks/main.yml @@ -38,7 +38,9 @@ ansible.builtin.apt: name: "{{ item }}" state: present - update_cache: true + # update cache fails on bionic because postgres no longer has a release + # only update cache on newer VMs; skip updating on older vms + update_cache: "{{ ansible_distribution_version != '18.04' }}" loop: - libpq-dev - python3-dev diff --git a/roles/python/tasks/install_dependencies.yml b/roles/python/tasks/install_dependencies.yml index 8f585432..f542781a 100644 --- a/roles/python/tasks/install_dependencies.yml +++ b/roles/python/tasks/install_dependencies.yml @@ -10,7 +10,7 @@ virtualenv_command: python{{ python_version }} -m venv --prompt "{{ python_venv_prompt }}" name: - pip - - setuptools + # - setuptools state: latest - name: Downgrade setuptools if 2to3 is required diff --git a/roles/python/tasks/install_python.yml b/roles/python/tasks/install_python.yml index f55f90c3..5c0231b7 100644 --- a/roles/python/tasks/install_python.yml +++ b/roles/python/tasks/install_python.yml @@ -23,4 +23,6 @@ - python{{ python_version }}-venv - python{{ python_version }}-distutils state: latest - update_cache: true + # update cache fails on bionic because postgres no longer has a release + # only update cache on newer VMs; skip updating on older vms + update_cache: "{{ ansible_distribution_version != '18.04' }}"