1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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" description: "fake-ppc64"
baseurl: "file://{{ repodir_ppc64 }}" baseurl: "file://{{ repodir_ppc64 }}"
gpgcheck: no gpgcheck: no
- set_fact:
repos:
- "fake-{{ ansible_architecture }}"
- "fake-i686"
- "fake-ppc64"
when: ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora'] when: ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora']

View file

@ -48,7 +48,14 @@
- ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora'] - ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora']
- ansible_python.version.major == 2 - 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: when:
- ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora'] - ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux', 'Fedora']
- ansible_python.version.major == 2 - ansible_python.version.major == 2