Remove old ODL RPM cfg file before installing new 51/77951/1
authorDaniel Farrell <dfarrell@redhat.com>
Mon, 19 Nov 2018 16:48:09 +0000 (16:48 +0000)
committerDaniel Farrell <dfarrell@redhat.com>
Mon, 19 Nov 2018 16:48:09 +0000 (16:48 +0000)
When running the role twice, the second run fails to update the ODL RPM
repository configuration file because the old file still exists.
Explicitly remove the old file before installing a new one.

Change-Id: I2c5334e30ec72406ba801f0378e6d960312ac288
JIRA: INTPAK-29
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
tasks/add_odl_yum_repo.yml

index 6d15db176b77f190949a0adaa99045eb622cd381..b0475dc7662f23add310721bd892f9085d2848d7 100644 (file)
@@ -1,8 +1,12 @@
-- name: Download ODL yum repo
+- name: Remove old ODL yum repo cfg file
+  file:
+    state: absent
+    path: /etc/yum.repos.d/opendaylight.repo
+- name: Download ODL yum repo cfg file
   get_url:
     url={{ rpm_repo_url }}
     dest=/etc/yum.repos.d/opendaylight.repo
-- name: Set ODL yum repo file properties
+- name: Set ODL yum repo cfg file properties
   file:
     path=/etc/yum.repos.d/opendaylight.repo
     owner=root