How to Use Ansible Vault | Ansible Vault Tutorial

preview_player
Показать описание
Ansible Vault is a function within Ansible that allows you to encrypt your passwords and sensitive information. If you want to know how to use Ansible Vault, this Ansible Vault Tutorial will step you through the basics of how to encrypt your sensitive data.
I will walk through an ansible vault password file example, how to use ansible vault in a playbook, how to decrypt file and how to change your ansible vault password, then finally we will go through an ansible vault playbook example.

Check out my Network Automation Courses

The file is encrypted so nobody can see it and then when you wish to access the information you need to pass Ansible the password so it can be unencrypted and used.
If you want to know how to use Ansible Vault in Playbook this video is for you

Whatever you do, don't forget your Ansible vault password!

This Ansible Vault Tutorial is taken from a blog post:

Ansible for Network Automation Course:

Timestamps:
00:00 Introduction to Ansible Vault
02:30 Encrypt test file - Ansible Vault Example
03:52 ansible-vault encrypt
04:30 View encrypted file
05:00 3 ways to use encrypt password
06:50 Decrypt file using ansible-vault decrypt
07:34 Change your encrypt password
08:00 Conclusion
08:20 Learn more about using Ansible for Network Automation
08:25 Ansible Vault Encrypt inventory or password files and make them encrypted

Also this is part of a course I have created called: Ansible for Network Engineers

I will cover Ansible Vault in much more detail and show you how to use it in Playbook runs, how to secure your Ansible Vault Password and also how to keep all your Ansible Vault files out of view in Github.

#ansible #networkautomation #rogerperkin
Рекомендации по теме
Комментарии
Автор

Thank you for this Roger, your videos are enjoyable to follow along, and the link to the Vault-Tutorial you included is EXACTLY what I'm trying to learn how to do. The Article is well written and easy to follow! Thank you!

aaronradcliffesr
Автор

It is nice to see a video to match a document to follow a long that all makes sense! Thank you This haes been very helpful. Very good job actually explaining what the title of the video says you will explain. Very relevant content.

michaelturner
Автор

Great video. I needed a refresher too. Thanks!

bsvenss
Автор

thanks man ....very easily and quickly explained.

balausnalejagtap
Автор

Clear explanation.Thank you for sharing your knowledge.

SadhamHussainsree
Автор

Hi Roger, Thanks for the video. I would like to place the encrypted secret file inside the server and this file needs to be used by some other developers without viewing (decrypting) the password. How would I do this?

srinivasangovindasamy
Автор

Hi Roger, firstly great content. Where is the 'enable' password referenced from to elevate user privileges on an IOS device? Thanks Rob

robertprice
Автор

What if I generated a password during an Ansible run which I would like to store persistently as a host_var?

junicast_tech
Автор

I dont understand how ansible vault is safe if i save the encrypted file password in plain text inside a file when i want to use it in scripts?

rbatchen
Автор

Command not found...in Linux. Is there a video showing the install process to be able to use ansible vault?

snarfallymunchacen
Автор

This is completely useless without a practical example of how to use vault variables in a playbook.

critore
Автор

I am running into an error when trying to view the encrypted vault-test.yml file.
ERROR! Decryption failed (no vault secrets were found that could decrypt) on vault-test.yml for vault-test.yml
I created it just as you posted so not sure what's up. I am on Ansible core 2.15.5

ap
Автор

If you are looking to encrypt just a password not the whole file:

ansible-vault encrypt_string password123 --ask-vault-pass

add the result to your host file:
ansible_password: !vault |
$ANSIBLE_VAULT;1.1;AES256




Run you command with --ask-vault-password and provide the password you used to encypt the string:
ansible Cisco -m ios_ping -a "dest=192.168.1.1" --ask-vault-pass


martinbuffleo