From: Thanh Ha Date: Tue, 21 Jul 2020 20:06:25 +0000 (-0400) Subject: Run an apt update before installing Git X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F64593%2F2;p=ansible%2Froles%2Fpython-install.git Run an apt update before installing Git 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 Change-Id: I836ff20f6bf6f922e91ecf209e87a09f81a22795 --- diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index eff9510..824813c 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -10,6 +10,12 @@ 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