DevOps, Day - 55

What is Ansible?

Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intraservice orchestration, and provisioning.


If Your OS is Ubuntu, you don't need any instances to complete these below tasks :)

#Run 1st set of commands at once
sudo apt update
sudo apt-get install software-properties-common
sudo apt-get install language-pack-en
sudo update-locale LC_CTYPE=en_US.UTF-8
sudo reboot

#run the below commands after setting up your system again...
#Run 2nd set of commands at once

sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
ansible --version


  1. To edit the Ansible hosts file with vim, use the following command:

     sudo vim /etc/ansible/hosts
    

    This command opens the host's file in the nano text editor, allowing you to make changes to the file.

  2. To list the Ansible inventory with ansible-inventory, use the following command (assuming you have a custom inventory file):

     ansible-inventory -i ~/local_inventory --list
    
  3. But I did it on my local machine itself...!


ansible -i local_inventory -m ping localhost

๐Ÿ’ก
I was able to successfully use Ansible for local automation tasks on my Ubuntu machine without the need for any remote instances or servers. This hands-on experience allowed me to perform tasks and configurations on my local system directly, demonstrating the versatility of Ansible for both local and remote automation.

Thank you so much for reading

Follow me on LinkedIn to see interesting posts like this : )

Linkedin

0
Subscribe to my newsletter

Read articles from Vrishni Shree V B directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vrishni Shree V B
Vrishni Shree V B

๐Ÿ’ป Python | Docker | Jenkins | Networking | Git | Linux ๐Ÿ’ป Passionate about leveraging technology to drive efficiency and deliver innovative solutions. Proficient in Python development, Docker containerization, Jenkins automation, computer networking, Git version control, and Linux administration. Skilled in collaborating with diverse teams to deliver high-quality software products. Proficient in AWS EC2 instance management and deployment. Seeking new opportunities to apply my expertise and contribute to impactful projects. Let's connect and explore how we can work together! Inter-personal Skills: Communication, Adaptability, Emotional intelligence, Active listening, Collaboration. Happy To Connect๐Ÿ”—๐Ÿ˜Š Feel free to reach me out๐Ÿ˜ƒ@ --> vrishnishreevb531@gmail.com ๐Ÿ“ฌ