Add support for ntpsec (#11665)

* Add support for ntpsec

* fixup: set default ntp_driftfile based on ntp_package

* fixup: docs
This commit is contained in:
David
2024-11-25 17:42:56 +01:00
committed by GitHub
parent faeb114c31
commit 9d6344aac7
3 changed files with 19 additions and 6 deletions

View File

@@ -21,6 +21,8 @@
ntp_config_file: >-
{% if ntp_package == "ntp" -%}
/etc/ntp.conf
{%- elif ntp_package == "ntpsec" -%}
/etc/ntpsec/ntp.conf
{%- elif ansible_os_family in ['RedHat', 'Suse'] -%}
/etc/chrony.conf
{%- else -%}
@@ -56,10 +58,10 @@
# noqa: jinja[spacing]
command: >-
timeout -k 60s 60s
{% if ntp_package == "ntp" -%}
ntpd -gq
{%- else -%}
{% if ntp_package == "chrony" -%}
chronyd -q
{%- else -%}
ntpd -gq
{%- endif -%}
when:
- ntp_force_sync_immediately