voxpupuli / puppet-chrony

Puppet module for Chrony with Systemd
https://forge.puppet.com/puppet/chrony
Apache License 2.0
13 stars 59 forks source link

RFE - Support for DNS Service record configuration #131

Open EPK-nl opened 2 years ago

EPK-nl commented 2 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

There is no support for the dynamic configuration of chrony.

What are you seeing

A missing parameter and corresponding functionality

What behaviour did you expect instead

The possibility to specify a list of DNS Service records containing the NTP service records.

Output log

None, as the functionality is missing.

Any additional information you'd like to impart

The code I created outside of the module to support the required functionality:

  # Support for dynamic configuration is not supported by the module (yet), so we configure it here.
  $dnssrv_records.each | String $srv_record | {
    exec { "chronyc-enable-${srv_record}":
      command => "/usr/libexec/chrony-helper enable-dnssrv ${srv_record}",
      unless  => "/bin/test -f /etc/systemd/system/timers.target.wants/chrony-dnssrv@${srv_record}.timer",
    }
  }

This does the trick, but should be in the module. The current test for the existence of the timer file should be replaced by matching the output of /usr/lib/chrony-helper list-dnssrv when this is in the module, allowing the removal of dynamic entries when they are no longer in the list.

jcpunk commented 2 years ago

It looks like chrony-helper is dropped in Fedora.... do we know how this is fairing upstream?