cleanup
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2022-04-10 17:38:37 +02:00
parent b1228ae022
commit 5c6cf6764e
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
5 changed files with 8 additions and 33 deletions

View File

@ -7,7 +7,7 @@ chrony_conf_file: /etc/chrony/chrony.conf
chrony_key_file: /etc/chrony/chrony.keys
chrony_drift_file: /var/lib/chrony/drift
# chrony_pool: $ "_unset_"
# @var chrony_pool:default: $ "_unset_"
chrony_server: "169.254.169.123 prefer iburst"
chrony_log: "tracking measurements statistics"

View File

@ -1,7 +1,7 @@
---
- name: Restart service
systemd:
name: chrony.service
name: chronyd.service
state: restarted
daemon_reload: True
enabled: True

View File

@ -8,9 +8,6 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_chrony_running_and_enabled(host):
command = "XDG_RUNTIME_DIR=/run/user/$(id -u) systemctl --user is-enabled chrony.service"
with host.sudo(user="chrony"):
status = host.check_output(command)
assert status == "enabled"
chrony = host.service("chronyd")
assert chrony.is_running
assert chrony.is_enabled

View File

@ -9,6 +9,7 @@
template:
src: etc/chrony.conf.j2
dest: /etc/chrony.conf
mode: 0644
notify: __chrony_restart
- name: Ensure service is up and running

View File

@ -2,7 +2,9 @@
port {{ chrony_port }}
acquisitionport {{ chrony_acquisitionport }}
{% if chrony_pool is defined %}
pool {{ chrony_pool }}
{% endif %}
server {{ chrony_server }}
keyfile {{ chrony_key_file }}
@ -13,44 +15,19 @@ log {{ chrony_log }}
logdir {{ chrony_log_dir }}
maxupdateskew {{ chrony_maxupdateskew }}
dumponexit
# Specify directory for dumping measurements.
dumpdir {{ chrony_dump_dir }}
{% if chrony_initstepslew_enabled | bool %}
initstepslew {{ chrony_initstepslew_threshold }} {{ chrony_initstepslew_servers }}
{% endif %}
# This directive lets 'chronyd' to serve time even if unsynchronised to any
# NTP server.
#local stratum 10
{% if chrony_allow | length > 0 %}
# This directive designates subnets (or nodes) from which NTP clients are allowed
# to access to 'chronyd'.
{% for block in chrony_allow %}
allow {{ block }}
{% endfor %}
{% endif %}
# This directive forces `chronyd' to send a message to syslog if it
# makes a system clock adjustment larger than a threshold value in seconds.
logchange 0.5
# This directive defines an email address to which mail should be sent
# if chronyd applies a correction exceeding a particular threshold to the
# system clock.
# mailonchange root@localhost 0.5
# This directive tells 'chronyd' to parse the 'adjtime' file to find out if the
# real-time clock keeps local time or UTC. It overrides the 'rtconutc' directive.
hwclockfile /etc/adjtime
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can't be used along with the 'rtcfile' directive.
rtcsync