Skip to main content
>_ supraj.dev
TOPIC DEVOPS
Configuration Management automating server setup and software configuration at scale
IN 10 SECONDS

Tools like Ansible, Puppet, or Chef define the desired state of servers in code — packages installed, services running, files placed. Ansible is agentless (SSH-based), while Puppet/Chef use agents. Running the tool converges the server toward the declared state, fixing any drift.

GOTCHA Idempotency is the goal but not automatic. A `shell` or `command` module runs every time unless you add `creates` or `when` conditions. Prefer dedicated modules (`apt`, `copy`, `template`, `systemd`) that are inherently idempotent.
HOW ANSIBLE CONVERGES A SERVER
01 Control node runs `ansible-playbook` with an inventory (list of hosts) and a playbook (YAML tasks).
02 Ansible engine SSHs into each host (or uses WinRM for Windows) and copies the Python modules needed for the tasks.
03 Each task checks the current state first (idempotency). Only makes changes if the actual state doesn't match the desired state.
04 Result reports changed=1, failed=0, ok=15 per host. Changed tasks are shown in yellow, unchanged in green.
POKE IT YOURSELF
ansible all -m ping — test SSH connectivity to all inventory hosts
ansible-playbook --check playbook.yml — dry-run a playbook without making changes