From 753f640cd6b8497a9d2def9e6e39aa757a90e05d Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 2 Aug 2017 08:54:05 +0000 Subject: [PATCH] Get Ansible to remove all older repo files Signed-off-by: Patrick Uiterwijk --- tasks/yumrepos.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tasks/yumrepos.yml b/tasks/yumrepos.yml index 736f7493ba..31c89b1de4 100644 --- a/tasks/yumrepos.yml +++ b/tasks/yumrepos.yml @@ -63,16 +63,6 @@ - packages - yumrepos -- name: add infrastructure repo - file: path="/etc/yum.repos.d/{{ item }}" state=absent - with_items: - - infrastructure.repo - - infrastructure-testing.repo - tags: - - config - - packages - - yumrepos - - name: add infrastructure tags repo - RHEL copy: src="{{ files }}/common/rhel-infra-tags.repo" dest="/etc/yum.repos.d/infra-tags.repo" when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') @@ -104,3 +94,17 @@ - config - packages - yumrepos + +- name: Make sure older infrastructure tags repos no longer exist + file: path="/etc/yum.repos.d/{{item}}" state=absent + with_items: + - fedora-infra-tags.repo + - fedora-infra-tags-stg.repo + - rhel-infra-tags.repo + - rhel-infra-tags-stg.repo + - infrastructure.repo + - infrastructure-testing.repo + tags: + - config + - packages + - yumrepos