Ansible基础

来自linux中国网wiki
Evan讨论 | 贡献2021年9月19日 (日) 08:35的版本 (创建页面,内容为“=ins= <pre> #on master pip3 install --user ansible ssh-copy-id -i id_ecdsa.pub [email protected] ssh-copy-id -i id_ecdsa.pub [email protected] ssh-copy-id -i…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索

ins

#on master
pip3 install --user ansible

ssh-copy-id  -i  id_ecdsa.pub [email protected]
ssh-copy-id  -i  id_ecdsa.pub [email protected]
ssh-copy-id  -i  id_ecdsa.pub [email protected]



mkdir   /etc/ansible
vi /etc/ansible/hosts

192.168.88.50
192.168.88.51
192.168.88.52

 ansible  all  -b -u root  -a "hostname"
192.168.88.51 | CHANGED | rc=0 >>
k8s-node1
192.168.88.50 | CHANGED | rc=0 >>
k8s-master
192.168.88.52 | CHANGED | rc=0 >>
k8s-node2

see also