1 chrony auto restart
[Unit]
Description=NTP client/server
Documentation=man:chronyd(8) man:chrony.conf(5)
After=ntpdate.service sntp.service ntpd.service
Conflicts=ntpd.service systemd-timesyncd.service
ConditionCapability=CAP_SYS_TIME
[Service]
Type=forking
PIDFile=/var/run/chrony/chronyd.pid
EnvironmentFile=-/etc/sysconfig/chronyd
ExecStart=/usr/sbin/chronyd $OPTIONS
ExecStartPost=/usr/libexec/chrony-helper update-daemon
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
Restart=always
[Install]
WantedBy=multi-user.target
2 deploy chrony
|
3 built in modules
file
文件或者目录的处理
ansible.builtin.file module – Manage files and file properties — Ansible Documentation
copy
本地节点分发文件到remote节点
ansible.builtin.copy module – Copy files to remote locations — Ansible Documentation
fetch
从remote节点拉取文件到本地节点
ansible.builtin.fetch module – Fetch files from remote nodes — Ansible Documentation
template
修改有变量的配置文件,并分发
ansible.builtin.template module – Template a file out to a target host — Ansible Documentation
systemd
centos 7 专有systemctl管理,服务器自启动、状态等
ansible.builtin.systemd module – Manage systemd units — Ansible Documentation
service
通用的服务启动、停止,状态监控等
ansible.builtin.service module – Manage services — Ansible Documentation
https://github.com/prometheus/node_exporter/blob/master/docs/TIME.md
Node Exporter 简介_node_exporter_富士康质检员张全蛋的博客-CSDN博客
https://github.com/prometheus/node_exporter
Set the time for your Linux instance - Amazon Elastic Compute Cloud