Skip to content

Ansible role for setting up NTP time synchronization on Debian

License

Notifications You must be signed in to change notification settings

CESNET/ansible-role-ntp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-role-ntp

Ansible role for setting up NTP time synchronization on Debian.

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/chrony.conf is edited to contain NTP server definitions specified in the variable ntp_servers.

Role Variables

  • ntp_servers - fragment of /etc/chrony/chrony.conf, default is
server ntp.muni.cz iburst
server tik.cesnet.cz iburst
server tak.cesnet.cz iburst
  • ntp_disable_default_pool
    • Default: false
    • Should be true if the default pool should be disabled Examples of Playbooks

    - hosts: all 
      roles:
         - role: cesnet.ntp
           vars:
             ntp_servers: |2
               server: tik.cesnet.cz iburst

or

    - hosts: all 
      tasks:
        - import_role:
            name: "cesnet.ntp"
          vars:
            ntp_servers: "{{ my_ntp_servers }}"

About

Ansible role for setting up NTP time synchronization on Debian

Resources

License

Stars

Watchers

Forks

Packages

No packages published