puppetlabs / puppetlabs-ntp

Puppet module to manage the NTP service
http://forge.puppetlabs.com/puppetlabs/ntp
Apache License 2.0
145 stars 328 forks source link

Generated ntp.conf has controlkey and requestkey lines with no values #677

Open robert-cam opened 1 year ago

robert-cam commented 1 year ago

Describe the Bug

When ntp::keys_controlkey and ntp::keys_requestkey are null the generated ntp.conf contains: requestkey controlkey

ntpd complains about these lines as syntax errors.

Expected Behavior

Don't output these lines if the variables are null.

Steps to Reproduce

Steps to reproduce the behavior: Generate a config file with these variables left on the default null from common.yaml in the module.

Environment

Additional Context

Testing for null with "unless $ntp::keys_controlkey.empty" in the template seems to fix this.