因为安全需要,批量改密是不时会有的
ansible grp -b -m shell -a 'echo "username:password"| chpasswd'
经过测试,对centos还有ubuntu都是适用的
修改完,再修改/etc/ansible/hosts
[grp:vars]
ansible_ssh_port=22
ansible_ssh_pass='password'
再看看通不通
ansible grp -b -m ping
因为安全需要,批量改密是不时会有的
ansible grp -b -m shell -a 'echo "username:password"| chpasswd'
经过测试,对centos还有ubuntu都是适用的
修改完,再修改/etc/ansible/hosts
[grp:vars]
ansible_ssh_port=22
ansible_ssh_pass='password'
再看看通不通
ansible grp -b -m ping
1224
5138

被折叠的 条评论
为什么被折叠?
