]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Fixed bug where entitlement setup would fail with --check. 6/head
authorAndrew Schoen <aschoen@redhat.com>
Thu, 30 Apr 2015 15:01:40 +0000 (10:01 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 30 Apr 2015 15:03:17 +0000 (10:03 -0500)
The command module is skipped when --check is used which causes the
registered var subscription to not exist the next task fails.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/common/tasks/rhel-entitlements.yml

index b3ee9e2d37e984b0996c10c321b7b88a6d86e3ef..b61c7a7e6470fe3d55fdb29b29159750ae5c7816 100644 (file)
@@ -19,7 +19,8 @@
            --activationkey={{ subscription_manager_activationkey }}
            --org={{ subscription_manager_org }}
   no_log: true
-  when: subscription.rc != 0
+  when: subscription is defined and
+        subscription.rc != 0
   register: entitled
 
 - name: disable all rhsm repos