geerlingguy / ansible-role-ntp

Ansible Role - NTP
https://galaxy.ansible.com/geerlingguy/ntp/
MIT License
318 stars 241 forks source link

chrony.conf.j2 doesn't use ntp_restrict variable #107

Closed breakid closed 2 years ago

breakid commented 3 years ago

The chrony.conf.j2 template contains the following section that should allow other clients to connect:

# Allow NTP client access from local network.
#allow 192.168.0.0/16

The commented out line should be replaced with a for each in ntp_restrict loop. The following command should make the necessary change.

sed -i 's|#allow 192.168.0.0/16|{% for item in ntp_restrict %}\nallow {{ item }}\n{% endfor %}|g' chrony.conf.j2

stale[bot] commented 2 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 2 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.