Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% 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 %}