Refactor test.yaml

Fix some common issues we have testing a role in the gate.

Change-Id: If376cc37be161ce37d0e42b0957e5c9a7f9aa843
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2015-11-24 14:23:42 -05:00
parent 8374bbb7ba
commit 0a733422c7

View File

@ -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 }}"