DevOps Classroomnotes 26/May/2023

Installing and Configuring Ansible

  • We will create two ubuntu vms
  • Create a user called devops in two vms with sudo permissions
  • Create a key-pair in ansible control node & copy the public key to other vm from ansible control node
  • Installing ansible
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible -y
  • Verify ansible version
    Preview
  • Now lets add inventory. Create a file called as hosts with one entry <ipaddress>
  • Check connectivity by executing ansible -m ping -i hosts all
    Preview
  • Note:
    • To enable password authentications edit config /etc/ssh/sshd_config and set PasswordAuthentication to yes from no
    • restart sshd service sudo service sshd restart

Linux Topics

  • User management
  • sudo
  • key management (ssh-keygen, ssh-copy-id)
  • package management (apt, yum, dnf)
  • file editing (nano, vim)

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube