From d0f6b18735da7c17aa120b1417710c9e942f56ca Mon Sep 17 00:00:00 2001
From: Ade Lee <alee@redhat.com>
Date: Thu, 23 Feb 2023 11:40:06 +0100
Subject: [PATCH] Add conditional for UA registration role

Without this conditional, the package install was being attempted
on Centos systems.  This needs to merge first to unblock further
testing.

Change-Id: I6fab2b1b85ed544096bb3206ecb9c4d5bc391f0d
---
 roles/enable-ua-subscription/tasks/main.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/enable-ua-subscription/tasks/main.yaml b/roles/enable-ua-subscription/tasks/main.yaml
index 8730258ac..f74c752e1 100644
--- a/roles/enable-ua-subscription/tasks/main.yaml
+++ b/roles/enable-ua-subscription/tasks/main.yaml
@@ -3,10 +3,10 @@
   package:
     name: ubuntu-advantage-tools
     state: present
+  when: ansible_distribution == 'Ubuntu'
 
 - name: Attach subscription
   command: pro attach --no-auto-enable "{{ ubuntu_ua_token.token }}"
   become: true
   no_log: true
-  when: >
-    (ansible_distribution == "Ubuntu")
+  when: ansible_distribution == 'Ubuntu'