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

Simplify removing ntp

parent b0424541
Branches
No related tags found
No related merge requests found
{%- from "hshbase/map.jinja" import hshbase with context -%}
### THIS FILE IS MANAGED BY SALT!
### YOUR CHANGES WILL BE OVERWRITTEN!
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
server {{ hshbase['time']['server'] }} iburst
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
{% from "hshbase/map.jinja" import hshbase with context %}
hsh_disable_legacy_ntp_service:
service.disabled:
- name: ntp
hsh_remove_legacy_ntp_conf:
file.absent:
- name: /etc/ntp.conf
- require:
- service:hsh_disable_legacy_ntp_service
{# ensuring this is purged is enough, so systemd-timesyncd will work #}
hsh_purge_legacy_ntp:
pkg.purged:
- name: ntp
- require:
- file:hsh_remove_legacy_ntp_conf
hsh_server_timezone:
timezone.system:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment