
A-Ansible
Ansible
AI克斯
每天进步一点点
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Ansible批量添加定时同步时间
多个服务器实现时间同步,使用ansible cron模块对主机记性周期性时间同步0x01:同步时间安装[root@ansible ~]# dateWed Dec 16 17:45:04 CST 2020[root@ansible ~]# yum install ntp -y选择时钟源服务器time1.aliyun.comtime.windows.com同步时间[root@ansible ~]# ntpdate time1.aliyun.com16 Dec 17:46:30 ntpd原创 2020-12-16 17:59:33 · 2996 阅读 · 0 评论 -
ansible条件判断
when[root@localhost ~]#vim test.yml ---- hosts: B remote_user: root tasks: - debug: msg="system release is centos" #“”不能少 when: ansible_distribution == "CentOS" #==两端加空格, "CentOS"...原创 2020-05-20 14:34:21 · 1941 阅读 · 0 评论