yum: clean fake repos after tests run (#37770)

This commit is contained in:
Martin Krizek 2018-03-22 18:19:29 +01:00 committed by Sam Doran
parent fcbee7e40b
commit ab1db9bcb8
2 changed files with 15 additions and 1 deletions

View file

@ -70,4 +70,11 @@
description: "fake-ppc64"
baseurl: "file://{{ repodir_ppc64 }}"
gpgcheck: no
- set_fact:
repos:
- "fake-{{ ansible_architecture }}"
- "fake-i686"
- "fake-ppc64"
when: ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora']

View file

@ -48,7 +48,14 @@
- ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora']
- ansible_python.version.major == 2
- include: 'repo.yml'
- block:
- include: 'repo.yml'
always:
- yum_repository:
name: "{{ item }}"
state: absent
with_items: "{{ repos }}"
- command: yum clean metadata
when:
- ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora']
- ansible_python.version.major == 2