Tuesday, February 22, 2022

Ansible - Vault


Ansible Vault

Ansible Vault is a feature of ansible that allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plaintext in playbooks or roles. These vault files can then be distributed or placed in source control.

Ansible Vault Commands

1. Create ansible-vault password-protected encrypted file.

     ansible-vault create playbook.yaml

2. Execute encrypted ansible-vault file.

    ansible-playbook playbook.yaml --ask-vault

3. Decrypt an ansible-vault file

     ansible-vault decrypt playbook.yaml

4. Encrypt existing playbook with ansible-vault

     ansible-vault encrypt playbook.yaml


Post a Comment