https://github.com/cesnet/ansible-role-ntp
Ansible role for setting up NTP time synchronization on Debian
https://github.com/cesnet/ansible-role-ntp
Last synced: about 23 hours ago
JSON representation
Ansible role for setting up NTP time synchronization on Debian
- Host: GitHub
- URL: https://github.com/cesnet/ansible-role-ntp
- Owner: CESNET
- License: apache-2.0
- Created: 2022-07-14T11:12:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-13T10:10:55.000Z (over 1 year ago)
- Last Synced: 2024-08-13T12:51:15.376Z (over 1 year ago)
- Size: 12.7 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-role-ntp
Ansible role for setting up NTP time synchronization on Debian/Ubuntu.
There are 3 packages for NTP in Debian: ntp, chrony and systemd-timesyncd.
This role installs the package **chrony** which uninstalls ntp or systemd-timesyncd
if any of them is already installed.
Then the file /etc/chrony/sources.d/cesnet.sources is created to contain NTP server definitions
specified in the variable ntp_servers.
Role Variables
--------------
* **ntp_servers** - content of /etc/chrony/sources.d/cesnet.sources, default is
```
server tik.cesnet.cz iburst
server tak.cesnet.cz iburst
server ntp1.cesnet.cz iburst
server ts1.cesnet.cz iburst
server ts2.cesnet.cz iburst
```
* **ntp_disable_default_pool**
* Default: `false`
* Should be `true` if the default Debian pool should be disabled
Examples of Playbooks
----------------
```yaml
- hosts: all
roles:
- role: cesnet.ntp
vars:
ntp_servers: |2
server: tik.cesnet.cz iburst
```
or
```yaml
- hosts: all
tasks:
- import_role:
name: "cesnet.ntp"
vars:
ntp_servers: "{{ my_ntp_servers }}"
```