Ansible is a free, open-source IT automation tool that automates server configuration, application deployment, and orchestration — all without agents.
What Is Ansible?
Ansible uses SSH to connect to servers and execute tasks defined in YAML files called playbooks. No agents to install. No database. Just SSH.
Key features:
- Agentless (uses SSH)
- YAML-based playbooks
- 3,000+ modules (packages, files, services, cloud, etc.)
- Idempotent (safe to run multiple times)
- Inventory management
- Roles and Galaxy (reusable components)
- Vault (encrypted secrets)
- Free and open source
Quick Start
pip install ansible
Example Playbook
# deploy.yml
- hosts: webservers
become: yes
tasks:
- name: Install Nginx
apt:
name: nginx
state: present
- name: Copy site config
template:
src: nginx.conf.j2
dest: /etc/nginx/sites-available/default
notify: Restart Nginx
- name: Deploy app
git:
repo: https://github.com/myorg/myapp.git
dest: /var/www/myapp
version: main
handlers:
- name: Restart Nginx
service:
name: nginx
state: restarted
ansible-playbook -i inventory.ini deploy.yml
Inventory
# inventory.ini
[webservers]
web1.example.com
web2.example.com
[databases]
db1.example.com
Ansible vs Alternatives
| Feature | Ansible | Puppet | Chef |
|---|---|---|---|
| Agent | No (SSH) | Yes | Yes |
| Language | YAML | DSL | Ruby |
| Learning curve | Low | High | High |
| Push/Pull | Push | Pull | Pull |
| Free | Yes | Freemium | Freemium |
With 64K+ GitHub stars. The simplest automation.
Automate data collection! Apify tools. Custom solutions: spinov001@gmail.com
Top comments (0)