Ansible Encryption Decryption

We can encrypt our variable with ansible-vault

For example:

ansible-vault encrypt secrets.json

And provide the password.

When running an ansible playbook which encrypted files, provide --vault-password-file

ansible-playbook -i staging.yml variable-test.yml --vault-password-file password.txt