Ansible — Development Environment & Programming
An automation tool that applies configuration across multiple servers using only SSH, managing infrastructure with declarative playbooks instead of scripts.
Basic information
| Program name | Ansible |
|---|---|
| One-line summary | An automation tool that applies configuration across multiple servers using only SSH, managing infrastructure with declarative playbooks instead of scripts. |
| Developed & maintained | Red Hat / Ansible Community |
| Official website | https://www.ansible.com/ |
| Official documentation | https://docs.ansible.com/ |
| Official download | https://docs.ansible.com/ansible/latest/installation_guide/index.html |
| Supported OS | Linux control node (Python 3.12+), targets via SSH/WinRM |
| License | GPL-3.0-or-later (ansible-core) |
| Stable version | Ansible Community 14.x / ansible-core 2.21 (2026-05 GA) — confirmed 2026-10-18 |
| GitHub repository | https://github.com/ansible/ansible |
| Category | Development environment and programming (tags: automation, IaC, configuration management, server operations, DevOps) |
What is this program?
Ansible is an automation tool that sends commands over SSH without installing a separate agent on managed servers. You declare what the desired state of a server should be in a YAML file called a playbook, and Ansible checks the current state and performs only the required tasks.
Unlike shell scripts, it describes what to change declaratively, so it is safe to re-run and can be reused and shared in roles. It has become standard automation for operational tasks such as server provisioning, package installation, permission settings, and cron registration.
What problems does it solve?
- ('Server provisioning', 'when you need to quickly build the same environment on multiple servers', 'a single playbook can apply packages, settings, and services across all of them.')
- ('Configuration drift', 'when server settings have drifted due to manual changes', 're-running can return them to the declared state.')
- ('Repetitive tasks', 'when patching, adding users, and configuring log rotation are done manually each time', 'standardize them with roles and playbooks to reduce risky rm commands and manual edits.')
Key features
Agentless SSH
Works over SSH without installing a separate program on the target.
- Use case: server fleet management
- What you get: start automation without installation burden
- Limitations: SSH key and privilege management must be completed first.
Declarative playbooks
Declares desired state in YAML
- Use case: configuration management
- What you get: re-run stability and readability
- Limitations: complex logic can become longer to express than in a script.
Roles and collections
Modularizes work units into roles and collections
- Use case: team standardization
- What you get: a reusable automation library
- Limitations: requires learning the internal structure of roles.
Fact gathering
Collects target information such as OS, IP, and memory for conditional branching
- Use case: handling distribution-specific differences
- What you get: multiple environments handled with a single playbook
- Limitations: fact gathering overhead can grow, so there is also a disable option.
Installation and usage
Linux (pip)
Install ansible-core on the control node.
python3 -m pip install --user ansible-core
ansible --version
Linux (distribution package)
Repository versions can be outdated, so checking the community package documentation is recommended.
sudo apt install ansible # Ubuntu repository
macOS
Install with brew or pip.
brew install ansible
Practical usage examples
Defining an inventory
Write the list of hosts to manage in an inventory file. Group them for easier management.
$ cat /etc/ansible/hosts
[web]
192.0.2.20
192.0.2.21
[db]
192.0.2.30
Writing and running a playbook
Write the target group and tasks in a playbook, then run it with ansible-playbook.
$ cat site.yaml
- hosts: web
become: yes
tasks:
- name: nginx install
apt: name=nginx state=present
$ ansible-playbook -i inventory site.yaml
Adaptive execution (check)
You can preview the impact without making changes using check mode.
$ ansible-playbook -i inventory site.yaml --check --diff
Advantages and limitations
Advantages
- Agentless — no additional software installation required on targets
- Declarative, so safe to re-run and easy to manage change history
- Reusable standard automation through the role and collection ecosystem
- Free and open source (ansible-core) with broad community support
Considerations before use
- With many hosts, serial SSH execution can be slow (requires pipelining and idempotency management).
- There is a learning curve for playbook syntax and role structure.
- Automation errors can affect multiple servers at once, so check mode and deployment order management are necessary.
Comparison with similar programs
| Program | Characteristics | Best suited for |
|---|---|---|
| Chef / Puppet | Agent-based configuration management | Large-scale, always-on synchronization environments |
| Terraform | Cloud infrastructure provisioning (IaC) | Compute and network resource creation stages |
| Shell scripts | Simple batch tasks | Small-scale, one-off tasks |
Official resources and further learning
- Official website — https://www.ansible.com/
- Official documentation / knowledge base — https://docs.ansible.com/
- Official download — https://docs.ansible.com/ansible/latest/installation_guide/index.html
- Release notes — https://docs.ansible.com/projects/ansible/latest/reference_appendices/release_and_maintenance.html
- Source / development resources — https://github.com/ansible/ansible
Version and supported environment information was confirmed on the official site as of 2026-10-18. Installation commands may vary depending on your distribution and version, so check the official installation documentation as well.
Example execution screen
The image below is a synthetic example created to help you understand the usage flow (not an actual execution result). The screen is a synthetic example and not an actual execution result.
!Ansible example: version check and running a playbook in check mode
Actual production server
Source (HTML): https://games.aidebatehub.com/programs/apps/dev/ansible.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments