ypsman.timedatectl
ansible timedatectl
设置 Systemd timedatectl NTP 配置。 在 Ubuntu 16.04/18.04、Debian 8/9 和 Centos7 上进行了测试。 如果系统未使用 systemd,则跳过该角色。
示例剧本
- hosts: all
roles:
- role: ypsman.timedatectl
timedatectl_timeservers:
- 0.debian.pool.ntp.org
- 1.debian.pool.ntp.org
timedatectl_timeservers_fallback:
- 2.debian.pool.ntp.org
- 3.debian.pool.ntp.org
timedatectl_timezone: Europe/Berlin