I have a .json file which I have successfully encrypted with ansible vault:
{
"database": {
"username": "root",
"password": "mypassword",
"host": "127.0.0.1:3306",
"name": "database"
}
}
Encrypted with: ansible-vault encrypt config.json
Run ansible playbook with: ansible-playbook -i hosts playbook.yml --ask-vault-pass
Enter the same password and the playbook runs but the files aren't unencrypted on the server.
Any ideas?