From b042454174386686fea80cb0d5786e200e9cb9de Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme <jan.philipp@timme.it> Date: Thu, 30 Jun 2022 10:43:52 +0200 Subject: [PATCH] Fix order, remove ntp for everyone if present --- hshbase/time/init.sls | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hshbase/time/init.sls b/hshbase/time/init.sls index 8e05594..1af41bf 100644 --- a/hshbase/time/init.sls +++ b/hshbase/time/init.sls @@ -1,23 +1,21 @@ {% from "hshbase/map.jinja" import hshbase with context %} -{% if (grains['os'] == 'Debian' and grains['osmajorrelease'] >= 10) or grains['os'] == 'Ubuntu' and grains['osmajorrelease'] >= 18 %} - -ntp: - pkg.purged +hsh_disable_legacy_ntp_service: + service.disabled: + - name: ntp -/etc/ntp.conf: +hsh_remove_legacy_ntp_conf: file.absent: + - name: /etc/ntp.conf - require: - - pkg: ntp + - service:hsh_disable_legacy_ntp_service -hsh_ntp_service_not_running: - service.disabled: +hsh_purge_legacy_ntp: + pkg.purged: - name: ntp - require: - - file: /etc/ntp.conf - - pkg: ntp + - file:hsh_remove_legacy_ntp_conf -{% endif %} hsh_server_timezone: timezone.system: -- GitLab