What Is Ansible?
Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows. It includes its own declarative language to describe system configuration. Ansible was written by Michael DeHaan and acquired by Red Hat in 2015. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management (allowing remote PowerShell execution) to do its tasks.
In other words you can run one command on multiple servers and win time.
How to install Ansible in Ubuntu server?
# Update server sudo apt-get update sudo apt-get upgrade -y # Install dependences sudo apt-get install python -y # Install repository sudo apt-add-repository ppa:ansible/ansible # Install ansible sudo apt install ansibleCode language: Bash (bash)
How to add hosts to ansbile?
sudo nano /etc/ansible/hosts
How to check added servers?
sudo ansible-inventory --list -yCode language: PHP (php)
How to test connection to the Ansible servers?
sudo ansible all -m ping -u root
How to run a command to all servers?
in conclusion we can say that ansible is a wonderful software for managing multiple Linux servers worldwide, extremely easy and accessible to work