From f452b4dbe241e0e0236002a0741d6bcc70bc466e Mon Sep 17 00:00:00 2001
From: Jan Philipp Timme <jan.philipp@timme.it>
Date: Wed, 13 Oct 2021 09:38:57 +0200
Subject: [PATCH] Remove ntp for Debian<10 or Ubuntu<18

---
 hshbase/time/init.sls | 33 +--------------------------------
 1 file changed, 1 insertion(+), 32 deletions(-)

diff --git a/hshbase/time/init.sls b/hshbase/time/init.sls
index 2d32cb5..8e05594 100644
--- a/hshbase/time/init.sls
+++ b/hshbase/time/init.sls
@@ -1,33 +1,6 @@
 {% from "hshbase/map.jinja" import hshbase with context %}
 
-{# We stick with ntpd for debian boxes before buster and for ubuntu boxes before bionic #}
-{% if (grains['os'] == 'Debian' and grains['osmajorrelease'] < 10) or (grains['os'] == 'Ubuntu' and grains['osmajorrelease'] < 18) %}
-ntp:
-  pkg.installed:
-    - refresh: True
-
-/etc/ntp.conf:
-  file.managed:
-    - source: salt://hshbase/time/files/ntp.conf
-    - template: jinja
-    - context:
-      hshbase: hshbase
-    - require:
-      - pkg: ntp
-
-hsh_ntp_service_running:
-  service.running:
-    - name: ntp
-    - reload: True
-    - enable: True
-    - watch:
-      - file: /etc/ntp.conf
-    - require:
-      - file: /etc/ntp.conf
-      - pkg: ntp
-
-{# The new boxes ensure the old stuff is away and the rest is configured in the interfaces section #}
-{% elif (grains['os'] == 'Debian' and grains['osmajorrelease'] >= 10) or grains['os'] == 'Ubuntu' and grains['osmajorrelease'] >= 18 %}
+{% if (grains['os'] == 'Debian' and grains['osmajorrelease'] >= 10) or grains['os'] == 'Ubuntu' and grains['osmajorrelease'] >= 18 %}
 
 ntp:
   pkg.purged
@@ -44,10 +17,6 @@ hsh_ntp_service_not_running:
       - file: /etc/ntp.conf
       - pkg: ntp
 
-{% elif grains['os'] == 'FreeBSD' %}
-
-{# TODO: Manage /etc/ntp.conf file. #}
-
 {% endif %}
 
 hsh_server_timezone:
-- 
GitLab