Run an apt update before installing Git 93/64593/2
authorThanh Ha <zxiiro@gmail.com>
Tue, 21 Jul 2020 20:06:25 +0000 (16:06 -0400)
committerThanh Ha <zxiiro@gmail.com>
Tue, 21 Jul 2020 20:14:12 +0000 (16:14 -0400)
Fix "git is not available" error that is appear in Ubuntu builds
which appears to be due to apt cache not being updated prior to
running install commands.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I836ff20f6bf6f922e91ecf209e87a09f81a22795

molecule/default/prepare.yml

index eff9510..824813c 100644 (file)
       when: ansible_os_family == 'RedHat'
       become: true
 
+    - name: Update APT cache
+      apt:
+        update_cache: yes
+      when: ansible_distribution == 'Ubuntu'
+      become: true
+
     - name: Install Git
       package: name=git state=present