From: Anil Belur Date: Mon, 29 Mar 2021 14:52:27 +0000 (+1000) Subject: Change install state to handle sys deps X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=234f8bc399b418da5db2719485c96ec6985f3dd2;p=ansible%2Froles%2Flf-recommended-tools.git Change install state to handle sys deps Using 'fixed' allows to correct a system with broken dependencies for Ubuntu 18.04. Error: E: Failed to fetch http://ubuntu.mirror.globo.tech/pool/main/m /mesa/libgl1-mesa-glx_20.0.8-0ubuntu1~18.04.1_amd64.deb Undetermined Error [IP: 68.168.114.246 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? Change-Id: I3f490fa1f6c5d36fd79345ae78227bebe8638d56 Signed-off-by: Anil Belur --- diff --git a/tasks/main.yml b/tasks/main.yml index 4dc72bd..36e34f1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,7 +18,7 @@ repo: ppa:ansible/ansible # Ubuntu 20.04 PPA is not yet available so skip installing it for now. # TODO: Figure out if recent versions of Ansible in Ubuntu is sufficient for - #. our use without the need to pull in from PPA. + # our use without the need to pull in from PPA. when: ansible_distribution == 'Ubuntu' and ansible_facts['distribution_major_version'] is version('20', '<') become: true @@ -29,10 +29,19 @@ when: ansible_os_family == 'RedHat' become: true -- name: Install LF Recommended Tools +- name: Install LF Recommended Tools on RedHat package: name: "{{ lf_recommended_tools_packages }}" state: present + when: ansible_os_family == 'RedHat' + become: true + +- name: Install LF Recommended Tools on Debian + # Note: apt module requires state: 'fixed' not in dnf or yum modules + package: + name: "{{ lf_recommended_tools_packages }}" + state: fixed + when: ansible_os_family == 'Debian' become: true - name: Install fedora-packager