Ansible Vault tutorial : How to secure ssh password using vault-id encryption |Cisco Example |Part 4

preview_player
Показать описание
Ansible Tutorial Playlist URL
This video explains how to use ansible vault. How to create vault-id, encrypt string and store it in inventory file
Create yaml inventory, comparison of INI and YAML inventory
Encryption of variables in ansible inventory
Creation of ansible ansible vault password file
Decryption example of encrypted password

all:
children:
DC_GROUP:
children:
DC01:
hosts:
R1:
ansible_host: 172.18.1.1
DC02:
hosts:
R2:
ansible_host: 172.18.1.2

vars:
ansible_connection: network_cli
ansible_network_os: ios
ansible_user: admin
ansible_password:admin

ansible DC_GROUP -m debug -a var="ansible_password" -e "hosts" --ask-vault-pass

#AnsibleVault
#AnsibleEncryptPassword
#AnsiblePlaybook
Рекомендации по теме
Комментарии
Автор

This video is very useful and clear. Thanks to share.

CarlosGuzmanLugo
Автор

Good video. How to do this for ssh_private_key ? I mean save an anisble-vault encrypted file and then tell the ansible that it should decrypt this at runtime !

rohitashwanigam
Автор

Is there any way by which we can avoid saving vault password in plain text format and also by not using a prompt to enter the password???.
I want to avoid saving plain text password of ansible vault and also no prompt while running the playbook.
All things in encrypted format is the ask be it ansible_password or vault
What I'm trying is using add hosts module in side playbook and passing password as extra variables but want to pass it as encrypted any solution or idea please help???? Thank u

shreeyanshshahi
Автор

good stuff, can't wait the next ansible episodes soon!

jessenorman
Автор

Getting an error on this portion of the video series.
Failed to parse /etc/ansible/hosts with yaml plugin: argument of type 'int' is not iterable

Not quite sure what the issue is here my yaml is valid syntax. Will update this comment if I find out that it's a version problem with ansible using python 2, or ubuntu 18.04lts.

Update:

YAML formatted hosts files currently can not have Numerical group names.
So if you have a ton of 3750's or 3850's etc that you want to group together with a baseline configuration or to change an admin password your group name MUST contain a letter.
I have opened an issue on the ansible github and hope to see that remedied as in our field it is quite common to reference devices by their model name.

DeadlyDragon_
Автор

Hi sir, I am waiting for your 5th video.. please upload asap.if need to paid for next video I am ready for this.please let mi know the details

sachinpatle