DEVOPS / A CONCEPT NOTE

Configuration Management

automating server setup and software configuration at scale

~75 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

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.

02 / FOLLOW THE MECHANISM

How ansible converges a server

  1. Control node

    runs ansible-playbook with an inventory (list of hosts) and a playbook (YAML tasks).

  2. Ansible engine

    SSHs into each host (or uses WinRM for Windows) and copies the Python modules needed for the tasks.

  3. Each task

    checks the current state first (idempotency). Only makes changes if the actual state doesn't match the desired state.

  4. Result

    reports changed=1, failed=0, ok=15 per host. Changed tasks are shown in yellow, unchanged in green.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

test SSH connectivity to all inventory hosts

ansible all -m ping

EXAMPLE 02 · REFERENCE

dry-run a playbook without making changes

ansible-playbook --check playbook.yml

Explore command anatomy in the CLI lab