Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ Set the [NTP Pool Area](http://support.ntp.org/bin/view/Servers/NTPPoolServers)
- "2{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"
- "3{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"

Set the non-pool NTP servers to use. Defaults to none.

ntp_servers_non_pool:
- "ntp.ubuntu.com"

Specify the NTP servers you'd like to use. Only takes effect if you allow this role to manage NTP's configuration, by setting `ntp_manage_config` to `True`.

ntp_restrict:
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ ntp_servers:
- "2{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"
- "3{{ '.' + ntp_area if ntp_area else '' }}.pool.ntp.org iburst"

# Single (non-pooled) NTP servers
ntp_servers_non_pool: []

ntp_restrict:
- "127.0.0.1"
- "::1"
Expand Down
3 changes: 3 additions & 0 deletions templates/chrony.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
{% for server in ntp_servers %}
server {{ server }}
{% endfor %}
{% for server in ntp_servers_non_pool %}
server {{ server }}
{% endfor %}
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).

Expand Down
4 changes: 4 additions & 0 deletions templates/ntp.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ tinker panic 0
pool {{ item }}
{% endfor %}

{% for item in ntp_servers_non_pool %}
server {{ item }}
{% endfor %}

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery
Expand Down