diff --git a/README.md b/README.md index 78b7092b..3664873a 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,11 @@ timesync_ntp_provider: chrony timesync_chrony_custom_settings: - "logdir /var/log/chrony" - "log measurements statistics tracking" + +# List of daeomn options that will be configured at startup of the services +# using 'OPTIONS' variable in '/etc/sysconfig/chronyd'. For all available +# options, see 'chronyd(8)' man page. +timesync_chrony_service_settings: [] ``` ## Example Playbooks diff --git a/defaults/main.yml b/defaults/main.yml index 1aa23c63..71b19918 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,3 +7,4 @@ timesync_min_sources: 1 timesync_ntp_hwts_interfaces: [] timesync_ntp_provider: "" timesync_max_distance: 0 +timesync_chrony_service_settings: [] diff --git a/templates/chronyd.sysconfig.j2 b/templates/chronyd.sysconfig.j2 index 600487fc..c0ecf480 100644 --- a/templates/chronyd.sysconfig.j2 +++ b/templates/chronyd.sysconfig.j2 @@ -1,4 +1,4 @@ {{ ansible_managed | comment }} {{ "system_role:timesync" | comment(prefix="", postfix="") }} -OPTIONS="" +OPTIONS="{{ timesync_chrony_service_settings | default([]) | join(' ') }}"