From 91f1f3ffd0ac2ae2042d813a8084a7516821e92b Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Mon, 27 Nov 2023 08:40:13 -0500 Subject: [PATCH] CIS 2.1.1.1 should not fail if systemd-timesyncd is not installed Signed-off-by: Karl DeBisschop --- tasks/section_2/cis_2.1.1.x.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/section_2/cis_2.1.1.x.yml b/tasks/section_2/cis_2.1.1.x.yml index 84e4bcbb..fe9cdd28 100644 --- a/tasks/section_2/cis_2.1.1.x.yml +++ b/tasks/section_2/cis_2.1.1.x.yml @@ -22,7 +22,9 @@ state: stopped enabled: false masked: true - when: ubtu20cis_time_sync_tool != "systemd-timesyncd" + when: + - ubtu20cis_time_sync_tool != "systemd-timesyncd" + - "'systemd-timesyncd' in ansible_facts.packages" when: - ubtu20cis_rule_2_1_1_1 tags: