The role configures and installs NTP under Linux and Windows. It is possible to specify multiple NTP servers for time synchronization. For Linux this is done via the NTP package, for Windows it is set up via the local GPO for the NTP synchronization.
ansible-galaxy install arillso.ntp
This role require Ansible 2.7 or higher. The platform requirements are listed in the metadata file.
List of NTP servers for time synchronization. Special case if an inventory group NAS is present it will be taken as the first NTP server.
ntp_server:
- "{{ groups['NAS'] | default('0.pool.ntp.org') }}"
- '1.pool.ntp.org'
- '2.pool.ntp.org'
- '3.pool.ntp.org'
Restrictions are used to control access to your ntpd:
ntp_config_restrict:
- '-4 default kod notrap nomodify nopeer noquery'
- '-6 default kod notrap nomodify nopeer noquery'
- '127.0.0.1'
- '::1'
Specifies to which interface NTP should be appended:
ntp_config_listen: []
NTP configurations details:
ntp_config_filegen:
- 'loopstats file loopstats type day enable'
- 'peerstats file peerstats type day enable'
- 'clockstats file clockstats type day enable'
ntp_config_statistics: 'loopstats peerstats clockstats'
ntp_config_crypto: ''
ntp_config_includefile: ''
ntp_config_keys: ''
ntp_config_trustedkey: ''
ntp_config_requestkey: ''
ntp_config_controlkey: ''
ntp_config_broadcast: ''
ntp_config_broadcastclient: ''
ntp_config_multicastclient: ''
ntp_config_tinker_panic_enabled: ''
Specifies if the time server is configured via Windows GPO so that it is not permanently overwritten.
ntp_GPO_enable: '{{ default_GPO_enable | default(false) }}'
Possible settings are described under the following link
ntp_time_type: 'NTP'
ntp_crosssitesyncflags: '2'
ntp_resolvepeerbackoffminutes: '15'
ntp_resolvepeerbackoffmaxtimes: '7'
ntp_specialpollinterval: '1024'
ntp_eventlogflags: '0'
Possible NTP flags that can be used under windows. 0x01 SpecialInterval 0x02 UseAsFallbackOnly 0x04 SymmatricActive 0x08 Client
ntp_flag: '0x01'
None
- Benno Joy
- René Moser
- Simon Bärlocher
This project is under the MIT License. See the LICENSE file for the full license text.
(c) 2020, Arillso