DevOps Classroom notes 21/Feb/2024

Ansible Components At a high level

  • Nodes:
    • Ansible control node:
      • This is the system where we install ansible which is built on python
      • This has to be a linux instance
    • Node:
      • This is the system where we deploy applications
      • This can be linux as well as windows
      • On linux nodes ansible expects python
  • Inventory: This is list of servers where we want to deploy applications
  • Playbook: This is the deployment expressed in declarative format
    Preview

Ways of working with Ansible

  • List out all the manual steps to install/configure your application
  • Execute them manually and once they are working then
  • Try converting each step into task.
  • Then optimize.

Setup Ansible

  • Launch two ubuntu 22.04 linux vms
  • Ensure python is installed
python3 --version
  • Now ssh (login) in to vm where we have to install ansible and Refer Here for the installation steps and use Refer Here for os specific installation and Refer Here for ubuntu steps
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible --yes
  • Lets check wheter ansible connect to node
  • ansible will login into node and execute instructions and to check whether ansible can do this or not
ansible -i hosts -m ping all
  • Lets create inventory with following ip into a file called as hosts
10.0.0.4

Preview

Exercises

  • Find the differences between windows file system and linux filesystem
  • What is package manager.

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
Plugin for Social Media by Acurax Wordpress Design Studio

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