ansible 批量添加/删除用户
- user 模块添加用户
ansible 192.168.5.212 -m user -a "name=www shell=/bin/bash createhome=yes"
- command模块删除用户及家目录
ansible 192.168.5.212 -m command -a "userdel www -r"
ansible 192.168.5.212 -m user -a "name=www shell=/bin/bash createhome=yes"
ansible 192.168.5.212 -m command -a "userdel www -r"