Change install state to handle sys deps 60/67260/7
authorAnil Belur <abelur@linuxfoundation.org>
Mon, 29 Mar 2021 14:52:27 +0000 (00:52 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Tue, 30 Mar 2021 21:49:34 +0000 (07:49 +1000)
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 <abelur@linuxfoundation.org>
tasks/main.yml

index 4dc72bd..36e34f1 100644 (file)
@@ -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
 
   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