Posts

Showing posts with the label Ansible

Ansible Explained: Servers Configured by Declaring What You Want

Introduction Configuring servers by hand — SSH in, install packages, edit config files, repeat on the next machine — does not scale, and shell scripts that do it tend to break on the second run. Ansible, released in 2012 and now part of Red Hat, automates infrastructure declaratively: you write YAML playbooks describing the desired state, and Ansible makes servers match it, over plain SSH, with no agent installed on the machines it manages. That agentless simplicity made it the gentlest on-ramp to infrastructure automation. Playbooks, tasks, and idempotence Ansible's model has three layers: Inventory — a list of hosts (servers) to manage, grouped by role: web servers, databases, and so on. Playbooks — YAML files of plays, each targeting a host group with a list of tasks. Modules — the units of work: apt installs packages, copy places files, service manages daemons — each module knows how to check current state and change only what differs. A playbook shows the style — declare th...