![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ansible
JackyOps
这个作者很懒,什么都没留下…
展开
-
使用ansible-play的user模块批量修改用户密码
使用ansible批量修改用户密码的方法,因为在使用ansible修改用户密码的时候不能使用明文的方式,需要先加密,所以就需要使用一个方法对输入的明文的密码进行加密,操作方法如下:方法一:1.1、该方法适用于更改多个用户;playbook写法如下:vim userpass.yaml---- hosts: zksit gather_facts: false tasks: ...原创 2018-12-05 15:27:08 · 5763 阅读 · 0 评论 -
ansible hosts文件写法
1、正常写法,name1为别名:[test1]name1 ansible_ssh_host=192.168.1.111 ansible_ssh_user="root" ansible_ssh_pass="1234" ansible_ssh_port=22name2 ansible_ssh_host=192.168.1.222 ansible_ssh_user="root" ansible_...原创 2018-12-05 17:58:28 · 12336 阅读 · 0 评论