Ansible role which installs and configures ntp.
- Tested on Ansible 2.3 or higher.
ntp_timezone
defaults toUTC
ntp_driftfile
defaults to/var/lib/ntp/ntp.drift
ntp_statsdir
defaults to/var/log/ntpstats/
ntp_servers
defaults to the following
- "0.pool.ntp.org"
- "1.pool.ntp.org"
- "2.pool.ntp.org"
- "3.pool.ntp.org"
ntp_auto_update
controls whether or not to periodically runntpdate
. Helpful with some troublesome virtual machines. It defaults tono
.ntp_auto_update_hour
determines which hour of the day to periodically runntpdate
. Defaults to12
.ntp_leapfile
defaults to/etc/ntp.leapseconds
ntp_leapurl
is the URL to retrieve the leap seconds file from. It defaults tohttps://www.ietf.org/timezones/data/leap-seconds.list
.ntp_restricts
defaults to the following
- "restrict 0.pool.ntp.org nomodify notrap noquery"
- "restrict 1.pool.ntp.org nomodify notrap noquery"
- "restrict 2.pool.ntp.org nomodify notrap noquery"
- "restrict 3.pool.ntp.org nomodify notrap noquery"
- "restrict default kod notrap nomodify nopeer noquery"
- "restrict 127.0.0.1 nomodify"
- "restrict -6 default kod notrap nomodify nopeer noquery"
- "restrict -6 ::1 nomodify"
This project comes with a VagrantFile, this is a fast and easy way to test changes to the role, fire it up with vagrant up
See vagrant docs for getting setup with vagrant
Licensed under the MIT License. See the LICENSE file for details.
Are welcome!