From 33368cdc772ac2eefadec785573a101a7ffae0d8 Mon Sep 17 00:00:00 2001 From: benblasco <42140583+benblasco@users.noreply.github.com> Date: Fri, 6 Jan 2023 04:25:48 +1100 Subject: [PATCH] Run insights scan (skip errors if not configured) (Issue #32) (#48) * Run insights scan (skip errors if not configured) (Issue #32) * Improved Insights client checks to use facts defined by redhatinsights.insights.insights_client role * Fixed missed call to debug module * Updated message for clarity Co-authored-by: Benjamin Blasco --- linux/patching.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/linux/patching.yml b/linux/patching.yml index b3b1f9e..bee3daa 100644 --- a/linux/patching.yml +++ b/linux/patching.yml @@ -8,6 +8,18 @@ - include_role: name: demo.patching.patch_linux + - name: Tell user when Insights Client is not configured + debug: + msg: "Insights client does not appear to be configured. Scan will be skipped" + when: + - ansible_local.insights.system_id is not defined + + - name: Run the Insights Client Scan + command: insights-client + when: + - not ansible_check_mode + - ansible_local.insights.system_id is defined + - block: - include_role: