摘要: #!/bin/bash #定义变量 export NODE_NAMES=(test1 test2 test3 test4) export NODE_IPS=(192.168.0.91 192.168.0.92 192.168.0.93 192.168.0.94) for node_name in ${NODE_NAMES[*]} do for node_ip in ${NODE_IPS... 阅读全文
posted @ 2019-02-07 19:33 effortsing 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 方式一、 1、配置资源清单inventory文件 [root@test1 ~]# cat >/etc/ansible/hosts /etc/ansible/hosts<<EOF [k8s] 192.168.0.92 [test3] 192.168.0.93 3、执行 sudo ansible k8s -m shell -a 'chmod +x /home/*' ... 阅读全文
posted @ 2019-02-07 11:32 effortsing 阅读(4637) 评论(0) 推荐(0) 编辑