[deyu1@kvm19 ansible]$ vim pwlist.yml [deyu1@kvm19 ansible]$ cat pwlist.yml devpw: '123123' prodpw: 'qweqwe'
[deyu1@kvm19 ansible]$ ansible-vault encrypt pwlist.yml New Vault password: Confirm New Vault password: Encryption successful
[deyu1@kvm19 ansible]$ echo 'pw4pwlist' > password.txt [deyu1@kvm19 ansible]$ cat password.txt pw4pwlist
[deyu1@kvm19 ansible]$ ansible-vault view pwlist.yml --vault-password-file=password.txt devpw: '123123' prodpw: 'qweqwe'