Ansible Pilot

Decrypt an Ansible Vault - ansible vault

How to decrypt an Ansible vault file using the ansible-vault command line utility.

November 13, 2022
Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons

How to decrypt an Ansible Vault?

From an encrypted file to plaintext using the correct password. I will show you a live demo with some simple Ansible code. I’m Luca Berton, and welcome to today’s episode of Ansible Pilot.


The ansible-vault command is included in every Ansible installation for the most modern operating system. It is a command line tool so interact with that using your terminal. Using the ansible-vault command, you could perform any Ansible vault operation: encryption, decryption, change of password, etc.

The Best Resources For Ansible


Video Course

Printed Book



I will show you how to decrypt an Ansible Vault using the ansible-vault command line utility. At the beginning of this example, we start with an encrypted Ansible vault, and once we enter the correct password, we obtain a cleartext file.


$ ansible-vault decrypt encrypted-to-plain.yml 
Vault password: 
Decryption successful

before execution

$ cat encrypted-to-plain.yml 

after execution

$ cat encrypted-to-plain.yml 
password: mysupersecretpassword


Now you know how to decrypt an Ansible Vault.

Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.


Learn the Ansible automation technology with some real-life examples in my

My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps

BUY the Complete PDF BOOK to easily Copy and Paste the 250+ Ansible code

Want to keep this project going? Please donate

Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons
Follow me

Subscribe not to miss any new releases