glillico.configure_ntp

Ansible Role : configure_ntp

CI

This role installs and configures either ntp or chrony on RedHat and Debian based systems.

NOTE:
The ntp package cannot be installed on a RedHat 8 based system using the standard repositories, as there is no package available.

Requirements

None.

Role Variables

defaults/main.yml

Variable Description
cntp_servers A list of time servers to use.
cntp_ntp_service_enable Enable and start the NTP service when set to true.

vars/Debian.yml

Variable Description
__cntp_ntp_service_name The name of the ntp service.
(Options: ntp, chrony).
__cntp_ntp_package_name The name of the ntp package.
(Options: ntp, chrony).
__cntp_configuration_file Full path and name of the ntp service configuration file.
(Options: ntp:/etc/ntp.conf, chrony:/etc/chrony/chrony.conf).
cntp_driftfile Full path and name of the ntp service drift file.
(Options: ntp:/var/lib/ntp/ntp.drift, chrony:/var/lib/chrony/chrony.drift).
cntp_leapseconds Full path and name of the ntp service leap seconds file.
(Options: /usr/share/zoneinfo/leap-seconds.list).
This applies to ntp only.
cntp_keysfile Full path and name of the ntp service configuration file.
(Options: /etc/chrony/chrony.keys).
This applies to chrony only.

vars/RedHat.yml

Variable Description
__cntp_ntp_service_name The name of the ntp service.
(Options: ntpd, chronyd).
__cntp_ntp_package_name The name of the ntp package.
(Options: ntp, chrony).
__cntp_configuration_file Full path and name of the ntp service configuration file.
(Options: ntp:/etc/ntp.conf, chrony:/etc/chrony.conf).
cntp_driftfile Full path and name of the ntp service drift file.
(Options: ntp:/var/lib/ntp/drift, chrony:/var/lib/chrony/drift).
cntp_leapseconds Full path and name of the ntp service leap seconds file.
(Options: /usr/share/zoneinfo/leapseconds).
This applies to ntp only.
cntp_keysfile Full path and name of the ntp service configuration file.
(Options: /etc/chrony.keys).
This applies to chrony only.

vars/RedHat-8.yml

Variable Description
__cntp_ntp_service_name The name of the ntp service.
(Options: chronyd).
__cntp_ntp_package_name The name of the ntp package.
(Options: chrony).
__cntp_configuration_file Full path and name of the ntp service configuration file.
(Options: /etc/chrony.conf).
cntp_driftfile Full path and name of the ntp service drift file.
(Options: /var/lib/chrony/drift).
cntp_keysfile Full path and name of the ntp service configuration file.
(Options: /etc/chrony.keys).

Dependencies

None.

Example Playbook

- hosts: servers
  vars_files:
    - vars/main.yml
  roles:
    - glillico.configure_ntp

License

MIT

Author Information

Created in 2020 by Graham Lillico.

Install
ansible-galaxy install glillico.configure_ntp
GitHub repository
License
mit
Downloads
76