Select Git revision
-
Dennis Ahrens authoredDennis Ahrens authored
init.sls 923 B
{% from "hshbase/map.jinja" import hshbase with context %}
{% if grains['os'] in ('Debian', 'Ubuntu') %}
ntp:
pkg.installed
/etc/ntp.conf:
file.managed:
- source: salt://hshbase/time/files/ntp.conf
- template: jinja
- context:
hshbase: hshbase
- require:
- pkg: ntp
{% if grains['os'] == 'Debian' and grains['oscodename'] != 'jessie' %}
hsh_ntp_service_running:
service.running:
- name: ntp
- reload: True
- enable: True
- watch:
- file: /etc/ntp.conf
- require:
- file: /etc/ntp.conf
- pkg: ntp
{% else %}
{# We are not waiting for ntp here! Read this:\n* https://github.com/systemd/systemd/issues/937\n* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635752 #}
{% endif %}
hsh_server_timezone:
timezone.system:
- name: {{ hshbase.time.zone }}
{% elif grains['os'] == 'FreeBSD' %}
{# TODO: Manage /etc/ntp.conf file. #}
{% endif %}