---
- hosts: cache
remote_user: root
tasks:
- name: create user "{{username}}"
user:
name: "{{username}}"
password: "{{pwd|password_hash('sha512')}}"
vim args.yaml
---
username:
fuck
pwd:
abcd123
ansible-playbook plj.yml -e @args.yaml
---
- hosts: cache
remote_user: root
tasks:
- name: create user "{{username}}"
user:
name: "{{username}}"
password: "{{pwd|password_hash('sha512')}}"
vim args.yaml
---
username:
fuck
pwd:
abcd123
ansible-playbook plj.yml -e @args.yaml
本文标题:隐藏用户名和密码
本文链接:https://www.haomeiwen.com/subject/aocymhtx.html
网友评论