]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Fix replace_repos logic 74/head
authorZack Cerza <zack@redhat.com>
Tue, 14 Jul 2015 01:08:24 +0000 (19:08 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 14 Jul 2015 16:38:15 +0000 (10:38 -0600)
The issues were with quoting of booleans, and |success vs. .rc == 0

Signed-off-by: Zack Cerza <zack@redhat.com>
roles/common/tasks/rhel-entitlements.yml

index 6679468a992ec54c877071430edc6c91d342395c..3f4e3abd9da6e8af3c729be655d4bca7db7e922a 100644 (file)
@@ -60,7 +60,7 @@
 - name: Set replace_repos if newly-subscribed
   set_fact:
     replace_repos: True
-  when: entitled|changed and entitled|success
+  when: entitled|changed and entitled.rc == 0
 
 - name: Set replace_repos if entitlement is skipped
   set_fact:
 
 - name: Disable all rhsm repos
   command: subscription-manager repos --disable '*'
-  when: replace_repos == "True"
+  when: replace_repos == True
   # This produces an absurd amount of useless output
   no_log: True
 
 - name: Enable necessary rhsm repos
   command: subscription-manager repos --enable {{ item }}
   with_items: rhsm_repos
-  when: replace_repos == "True" and rhsm_repos|length > 0
+  when: replace_repos == True and rhsm_repos|length > 0
 
 - name: Remove old apt-mirror repository definition.
   file: