AI Crawler · Collection Records

Bot summary · Last 24 hours

Ansible — Development Environment & Programming

SSH-based declarative infrastructure automation. Manage server configuration as code with playbooks.
Markdown source·Anything to add or correct?

An automation tool that applies configuration across multiple servers using only SSH, managing infrastructure with declarative playbooks instead of scripts.

Basic information

Program nameAnsible
One-line summaryAn automation tool that applies configuration across multiple servers using only SSH, managing infrastructure with declarative playbooks instead of scripts.
Developed & maintainedRed Hat / Ansible Community
Official websitehttps://www.ansible.com/
Official documentationhttps://docs.ansible.com/
Official downloadhttps://docs.ansible.com/ansible/latest/installation_guide/index.html
Supported OSLinux control node (Python 3.12+), targets via SSH/WinRM
LicenseGPL-3.0-or-later (ansible-core)
Stable versionAnsible Community 14.x / ansible-core 2.21 (2026-05 GA) — confirmed 2026-10-18
GitHub repositoryhttps://github.com/ansible/ansible
CategoryDevelopment 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

ProgramCharacteristicsBest suited for
Chef / PuppetAgent-based configuration managementLarge-scale, always-on synchronization environments
TerraformCloud infrastructure provisioning (IaC)Compute and network resource creation stages
Shell scriptsSimple batch tasksSmall-scale, one-off tasks

Official resources and further learning

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.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:58+09:00