Ansible Youtube Pass Phrase

 https://www.youtube.com/watch?v=-Q4T9wLsvOQ&list=PLT98CRl2KxKEUHie1m24-wkyHpEsa4Y70&index=2

 eval $(ssh_agent)

 ssh_agent is a process that can run in the background and cache your passohrase 


The pid tells that the ssh_agent is running

ssh-add



The passphrase to be saved. has to be entered here.

now you can connect without ssh password

ssh <ip_address>

But this is not permanent once you close the terminal window the passphrase is gone.

I can make this my creating an alias


The alias is also gone once you close the terminal window


vi . bashrc 

 


ansible all  --key-file ~/.ssh/ansible -i inventory -m ping

ansible all -m gather_facts
show the output for all

ansible all -m gather_facts --limit 172.123.131.10
this show the output of just one server

ansible all -m apt -a update_cache=true --become --ask-become-pass

 

ansible all -m apt -a "name-snapd state=latest" --become --ask-become-pass





Comments

Popular posts from this blog

Ansible Core Modules and Aliases

Learn -Ansible - Tutorial

Ansible Versions