ansible]# vim user2.yml
---
- hosts: cache
remote_user: root
vars:
user: wangwu
tasks:
- user:
name: "{{user}}"
group: root
password: "{{'123456' | password_hash('sha512')}}"
- shell: chage -d 0 "{{user}}"
ansible]# ansible-playbook user2.yml
手机扫一扫
移动阅读更方便
你可能感兴趣的文章