DevOps, Day - 55

DevOps, Day - 55

Understanding Configuration Management With Ansible

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

Β