DevOps Classroom notes 28/Oct/2026

Ansible:

Ansible is open-source IT tool for automation (Redhat)

Where ansible will be used:

  1. configuration managment -> Install, upgrade and manage files and services
  2. Application deploymnet -> Deploy code access multiple sites
  3. Orchestration: used deploy micro services
  4. provisioning: Setup infra (vms, cloud resources)

Key Points:

  • Agentless – NO softwares are required to install
  • yaml-based- files will be human readable
  • pushbased – control machine will connect to nodes directly
  • idempotent – we can run twice or more the result will be same.

ansible

Install ansible

offical docs for ansible installtion

sudo su - # sudo perrmission to become root user 

sudo adduser ansible # create ansible user 

sudo nano /etc/ssh/sshd_config.d/10-password-login-for-special-user.conf  ## allow user to login ssh with password
Match User ansible
    PasswordAuthentication yes
sudo systemctl restart ssh
sudo systemctl restart sshd
# ubuntu 
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible -y  
ansible --version ## Verify ansible server version 

Default paths:

  1. inventory -> /etc/ansible/hosts
  2. roles -> /etc/ansible/roles
  3. /usr/bin/ansible -> binary path
  4. /etc/ansible/ansible.cfg -> main configuration file
  5. temp – ~/.ansible/temp

Create keypair and copy to ansible user

ssh-keygen 
ssh-copy-id user@ipaddress
ssh-copy-id ansible@localhost

# sudo permissions to user 
sudo visudo

ansible ALL=(ALL:ALL) NOPASSWD:ALL

ssh ansible@ipaddress 
sudo su -

Task

  1. setup ansible server and create node install python and create ansible user
  2. generate ssh-key in ansible server and copy key node.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio
Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube