diff --git a/tasks/prelim.yml b/tasks/prelim.yml index 69ada8a..b5c60aa 100644 --- a/tasks/prelim.yml +++ b/tasks/prelim.yml @@ -124,6 +124,15 @@ changed_when: false check_mode: false +- name: "PRELIM | Check for systemd-timesyncd service" + shell: "set -o pipefail; + systemctl show systemd-timesyncd | grep LoadState | cut -d = -f 2" + args: + executable: /bin/bash + register: systemd_timesyncd_service_status + changed_when: false + check_mode: false + - name: "PRELIM | Check for avahi-daemon service" shell: "set -o pipefail; systemctl show avahi-daemon | grep LoadState | cut -d = -f 2" diff --git a/tasks/section2.yml b/tasks/section2.yml index 042908a..f6ddaeb 100644 --- a/tasks/section2.yml +++ b/tasks/section2.yml @@ -330,7 +330,7 @@ masked: yes when: - ubuntu2004cis_time_synchronization == "ntp" - - chronyd_service_status.stdout == "loaded" + - systemd_timesyncd_service_status.stdout == "loaded" when: - ubuntu2004cis_rule_2_2_1_1