Sitemap
DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Ansible Setup

--

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository - yes - update ppa:ansible/ansible
sudo apt install ansible

After installing the Ansible,

Set up the hostnames in both machines.

For master machine: hostnamectl set-hostname masternode

For node machine: hostnamectl set-hostname node101

Get Muhammad Rafay’s stories in your inbox

Join Medium for free to get updates from this writer.

set SSH so Ansible can access the node machine

// write this in master machine so node will be accessible
ssh-keygen
ssh-copy-id <username>@ip
//check
ssh <username>@ip

After setting this you have to ping through this command

ansible all -m ping

After doing this if you are facing an error then go to

cat /etc/ssh/sshd_config

and uncomment this line if you want the sudo priviliges and set it to yes

#PermitRootLogin yes

Setup done!

I hope It will help you install ansible tool!

#Ansible

--

--

DevOps.dev
DevOps.dev

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.