From c2acbf6dd893358261f81dc866faca42ffb33a42 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 30 Apr 2015 10:01:40 -0500 Subject: [PATCH] Fixed bug where entitlement setup would fail with --check. 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 --- roles/common/tasks/rhel-entitlements.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/common/tasks/rhel-entitlements.yml b/roles/common/tasks/rhel-entitlements.yml index b3ee9e2d..b61c7a7e 100644 --- a/roles/common/tasks/rhel-entitlements.yml +++ b/roles/common/tasks/rhel-entitlements.yml @@ -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 -- 2.47.3