Make sure we have valid package caches for Debian
Be cause we don't want to manage apt or yum in our role, we need to make sure each has a valid cache before running the role. Currently we are only seeing this issue under Ubuntu Trusty, but we should keep an eye out to see if it affects Centos. Change-Id: Ib365b89284e18935389a86bb9d3904bfa3c83cc7 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
27941b8199
commit
8ed86363e3
|
@ -20,6 +20,12 @@ including Jenkins and Zuul.
|
|||
Requirements
|
||||
------------
|
||||
|
||||
Packages
|
||||
~~~~~~~~
|
||||
|
||||
Package repository index files should be up to date before using this role, we
|
||||
do not manage them.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
|
|
|
@ -13,7 +13,15 @@
|
|||
# under the License.
|
||||
---
|
||||
- hosts: localhost
|
||||
sudo: yes
|
||||
vars:
|
||||
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
|
||||
pre_tasks:
|
||||
# Make sure OS does not have a stale package cache.
|
||||
- name: Update apt cache.
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
roles:
|
||||
- "{{ rolename }}"
|
||||
|
|
Loading…
Reference in New Issue