timesync
timesync copied to clipboard
add timesync_ntp_custom_settings variable for free-form local configs
Found this small addition useful in my local installation, thought it might be helpful to others.
The role used to have some variables for adding settings directly to the generated config files, but IIRC they were removed in order to hide the implementation-specific details.
Later was added a variable for selecting the NTP provider, so it may no longer be a goal.
I would agree with this change, in fact I was checking how would be possible to add extra options in chrony.conf which should apply a similar change to the one proposed here. We rely on some customized settings and with the current templates we are not able to deploy them. I will create a new merge request for chrony based on this pull request (for keeping coherency in case that this is merged).
[citest commit:ab66e75457880e7184a2d7b27d428f566ca7c40e]
@mlichvar @pcahyna This seems like a good feature - do we have a best practices for specifying provider specific settings?
[citest]
I'm not aware of any best practices for injecting configuration snippets like this. I think it would be good to warn the users that there are no guarantees a working config will not stop working with a newer version of the role if the template is changed for instance. We don't want to make any assumption about what is injected in the config.
[citest bad]
[citest pending]
[citest bad]
[citest pending]
I'll note that https://github.com/linux-system-roles/timesync/pull/80 did this for chrony settings and that PR includes a test to verify the custom settings - something similar should be done for the custom ntp settings
[citest pending]
[citest bad]
[citest pending]
please rebase to latest master branch
[citest pending]
[citest pending]
@jontow please rebase on top of latest master branch
[citest pending]
@jontow please rebase on top of latest master branch
closing due to inactivity