baseline_ntp¶
The cake function baseline_ntp
executes the Ansible role-ntp, which installs and configures ntpd, the Network Time Protocol Daemon.
The role:
- defines the NTP servers in
/etc/ntp.conf
- sets the default timezone for the server
Information¶
Key | Value |
---|---|
Playbook path | plays/baseline/ntp.yml |
Role | https://git.blunix.com/ansible-roles/role-ntp |
Tags | https://git.blunix.com/ansible-roles/role-ntp/-/tags |
Defaults | https://git.blunix.com/ansible-roles/role-ntp/-/blob/master/defaults/main.yml |
Config file | Description |
---|---|
/etc/ntp.conf | defines time servers |
Example¶
Hetzner NTP server documentation
inventory/group_vars/hcloud.yml
:
ntp_servers_hosting_provider:
- ntp1.hetzner.de
- ntp2.hetzner.com
- ntp3.hetzner.net
Usage¶
Show status:
ntpq -pn
Force time update:
service ntp stop
ntpd -gq
service ntp start