Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrony templates: always use debian pool #20

Open
mika opened this issue Nov 19, 2024 · 1 comment · May be fixed by #21
Open

chrony templates: always use debian pool #20

mika opened this issue Nov 19, 2024 · 1 comment · May be fixed by #21

Comments

@mika
Copy link
Contributor

mika commented Nov 19, 2024

The chrony templates use:

# Use Debian vendor zone.
pool 2.debian.pool.ntp.org iburst
[...]
{% if base_ntp_server is defined %}
# Set NTP server which can be used as a time source (server),
# prefer this source over sources without the prefer option (prefer) an
# start with a burst of 4-8 requests in order to make the first update of the clock sooner (iburst)
server {{ base_ntp_server }}
#
{% endif %}

IMO this isn't expected behavior, as then the Debian pool always gets used, even if base_ntp_server is set to a custom server.

I'd assume something like this:

{% if base_ntp_server is defined %}
# Set NTP server which can be used as a time source (server),
# prefer this source over sources without the prefer option (prefer) an
# start with a burst of 4-8 requests in order to make the first update of the clock sooner (iburst)
server {{ base_ntp_server }}
{% else %}
# Use Debian vendor zone.
pool 2.debian.pool.ntp.org iburst
{% endif %}

Happy to provide a PR if you agree.

@jkirk
Copy link
Owner

jkirk commented Nov 19, 2024

Hmm, yeah... I also regularly stumble across these lines, but tell myself that the Debian NTP pool is trustworthy and can "always" be used (even if server (with base_ntp_server) is set). 🙈

So yes, your proposal is fine for me (if you think we should get rid of the Debian NTP pool, if we have a server set). Thx!

jkirk added a commit that referenced this issue Jan 2, 2025
If base_ntp_server is defined, aka we have set a custom ntp server, we
do not want to use the Debian pool.

Closes: #20
jkirk added a commit that referenced this issue Jan 7, 2025
If base_ntp_server is defined, aka we have set a custom ntp server, we
do not want to use the Debian pool.

Ansible Molecule verifier checks the expected files.
The `pool` line needs to be removed, as we now expect that the Debian
pool is missing, if base_ntp_server is defined.

Closes: #20
jkirk added a commit that referenced this issue Jan 7, 2025
If base_ntp_server is defined, aka we have set a custom ntp server, we
do not want to use the Debian pool.

Ansible Molecule verifier checks the expected files.
The `pool` line needs to be removed, as we now expect the Debian
pool line to be missing if base_ntp_server is defined.

Closes: #20
@jkirk jkirk linked a pull request Jan 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants