Skip to content
Snippets Groups Projects
Commit f452b4db authored by Jan Philipp Timme's avatar Jan Philipp Timme
Browse files

Remove ntp for Debian<10 or Ubuntu<18

parent e2ec9ac6
No related branches found
No related tags found
No related merge requests found
{% from "hshbase/map.jinja" import hshbase with context %} {% 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 %}
{% 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 %}
ntp: ntp:
pkg.purged pkg.purged
...@@ -44,10 +17,6 @@ hsh_ntp_service_not_running: ...@@ -44,10 +17,6 @@ hsh_ntp_service_not_running:
- file: /etc/ntp.conf - file: /etc/ntp.conf
- pkg: ntp - pkg: ntp
{% elif grains['os'] == 'FreeBSD' %}
{# TODO: Manage /etc/ntp.conf file. #}
{% endif %} {% endif %}
hsh_server_timezone: hsh_server_timezone:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment