An Ansible role that installs and configures Chrony service on Linux and sets Timezone.
chrony is a versatile implementation of the Network Time Protocol (NTP). It can synchronise the system clock with NTP servers, reference clocks (e.g. GPS receiver), and manual input using wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer to provide a time service to other computers in the network
Role tested on Linux operating systems:
- Ubuntu Server 18.04 LTS
- Ubuntu Server 16.04 LTS
None.
chrony_servers: The chrony pool servers to synchronize from with its default value.
chrony_servers:
- a.ntp.br
- b.ntp.br
- c.ntp.br
chrony_timezone: The Timezone to configure system-wide with its default value.
chrony_timezone: America/Sao_Paulo
The cron service will be reloaded every time the Timezone changes.
None.
- hosts: all
become: True
roles:
- role: brodriguesneto.ansible_chrony
chrony_timezone: America/Sao_Paulo
chrony_servers:
- 0.br.pool.chrony.org
- 1.br.pool.chrony.org
- 2.br.pool.chrony.org