Ansible is the tool that turns "log into 20 servers and run the same commands" into "run one command once." It's agentless β nothing to install on the machines you manage, just SSH and Python, which they already have.
This guide gets you from a fresh Ubuntu install to your first working playbook.
Install Ansible on the control node
On Ubuntu, the distro package is fine for getting started:
sudo apt update sudo apt install -y ansible ansible --version
Enter fullscreen mode
Exit fullscreen mode
For the newest release, use pip instead:
sudo apt install -y python3-pip pip install ansible-core
Enter fullscreen mode
Exit fullscreen mode
The machine running Ansible is the control node . Your servers only need SSH access and Python β nothing else.
Set up SSH access to your servers
Ansible talks to servers over SSH, so key-based login makes everything smoother:
ssh-copy-id [email protected]
Enter fullscreen mode
Exit fullscreen mode
Repeat for each server.β¦