]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Make sure yum clean all is ran after repos are changed.
authorAndrew Schoen <aschoen@redhat.com>
Tue, 21 Apr 2015 16:27:31 +0000 (11:27 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 21 Apr 2015 20:32:14 +0000 (15:32 -0500)
There was a bug here because the repo_file registered variable was being
overwritten causing the yum clean all not to run even though the first
block using repo_file had changed. Not reusing the same var for both the
blocks fixed the issue.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/testnode/tasks/yum/repos.yml

index dd6f090b1a5cbb63484aa961401a1388fd289c46..4b24c5e54918d23ac9e27f0dd063893ea7ab278f 100644 (file)
@@ -17,7 +17,7 @@
     owner: root
     group: root
     mode: 0644
-  register: repo_file
+  register: version_repo_file
   with_dict: yum_repos
   when: yum_repos.keys() | length > 0
 
@@ -28,6 +28,6 @@
 
 - name: Clean yum cache
   shell: yum clean all
-  changed_when: false
-  when: (repo_file is defined and repo_file.changed) or
-        (gpg_keys is defined and gpg_keys.changed)
+  when: (repo_file is defined and repo_file|changed) or
+        (gpg_keys is defined and gpg_keys|changed) or
+        (version_repo_file is defined and version_repo_file|changed)