Set up a ntp server in Debian-like systems.
None
ntp_driftfile
[default:/var/lib/ntp/ntp.drift
]]: This command specifies the name of the file use to record the frequency offset of the local clock oscillatorntp_statsdir
[default:false
]]: Set this (to/var/log/ntpstats
) if you want statistics to be logged (Must not end with a slash)ntp_statistics
[default:[loopstats, peerstats, clockstats]
]]:ntp_filegens
[default:['loopstats file loopstats type day enable', 'peerstats file peerstats type day enable', 'clockstats file clockstats type day enable']
]]:ntp_servers
[default:[0.ubuntu.pool.ntp.org, 1.ubuntu.pool.ntp.org, 2.ubuntu.pool.ntp.org, 3.ubuntu.pool.ntp.org, ntp.ubuntu.com]
]]: The servers to sync time withntp_restricts
[default:['-4 default nomodify nopeer noquery notrap', '-6 default nomodify nopeer noquery notrap', '127.0.0.1', '::1']
]]:ntp_enables
[default:[]
]]: Provides a way to enable various server optionsntp_disables
[default:[monitor]
]]: Provides a way disable various server optionsntp_broadcast
[default:false
]]: In broadcast mode the local server sends periodic broadcast messages to a client population at the address specifiedntp_broadcastclient
[default:false
]]: This command enables reception of broadcast server messages to any local interface
None
ansible-logrotated
(see, whenntp_statsdir != false
)
---
- hosts: all
roles:
- oefenweb.ntp
---
- hosts: all
roles:
- oefenweb.ntp
- oefenweb.logrotated
vars:
ntp_statsdir: /var/log/ntpstats
logrotated_logrotate_d_files:
ntpstats:
- logs:
- '/var/log/ntpstats/*'
weekly: true
missingok: true
rotate: 8
compress: true
delaycompress: true
notifempty: true
copytruncate: true
BSD
Mischa ter Smitten (based on work of Benno Joy)
Are welcome!