Sunday, June 2, 2024

Ansible - Setup on Linux ( +cisco devices )

 

Ansible Installation

On the ubuntu shell run:

sudo apt update
sudo apt upgrade -y

 

# PYTHON

sudo apt-get install python3

sudo apt install python3-pip

 

# ANSIBLE

sudo apt install -y software-properties-common

sudo apt install -y ansible

 

# ANSIBLE COMMON MODULES / LIBRARIES (OPTIONAL)

ansible-galaxy collection install cisco.ios

sudo apt-get install python3-dnspython

sudo pip install ansible-pylibssh

sudo pip install pexpect

sudo pip install paramiko

sudo apt-get install sshpass


SSH Host Key Checking

If you want to avoid issues on connecting via SSH because the the keys are not added, go to:  

sudo nano /etc/ansible/ansible.cfg

and uncoment the "host_key_checking" line:

[defaults]
host_key_checking = False

Verification

WSL

Win+r ubuntu

 

PYTHON

python3

 

ANSIBLE

ansible-playbook --version


2 comments:

Discount Drift said...

What a fantastic blog! The detailed analysis and well-structured content make it an informative and enjoyable read. Your hard work and dedication are evident. Keep producing such great content!
https://www.discountdrift.com/promotions`

Coupons Studio said...

I'm blown away by this blog! The insightful content and clear, concise writing make it a standout piece. Your dedication to providing valuable information is evident. Keep inspiring us with your work!
https://www.couponsstudio.com/all-stores