MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Configuration Management in DevOps: Workflow, Tool Comparison, and an Ansible Example

Originally published on 2010-03-21; fully revised and updated.

Configuration management is the practice of defining and enforcing system configuration as code so environments stay consistent over time. This rewrite is aimed at DevOps engineers and platform teams who need repeatable deployments, reduced drift, and safer change control across development, staging, and production.

The original post was a short SlideShare embed. This updated version provides a complete, practical reference you can use directly.

Original embedded slide deck (archival)

Original permalink: https://www.devopsschool.com/blog/power-point-ppt-configuration-management/

{slideshare}[slideshare id=1117749&doc=configurationmanagement-090308134227-phpapp02]{/slideshare}

What configuration management solves

Without configuration management, servers and clusters tend to diverge over time: package versions drift, manual fixes are forgotten, and incidents become harder to reproduce. With configuration managed as code, teams can track changes, review them, and apply them consistently.

  • Consistency: same desired state across environments.
  • Auditability: configuration changes are tracked in version control.
  • Repeatability: rebuilding or scaling infrastructure is predictable.
  • Drift control: unauthorized or accidental changes are easier to detect and correct.
  • Safer operations: dry runs, peer review, and staged rollout reduce change risk.

End-to-end workflow in a DevOps pipeline

A robust workflow treats configuration exactly like application code: author, review, validate, stage, deploy, and continuously check for drift.

flowchart TD
    A[Define desired state as code] --> B[Commit to Git]
    B --> C[CI validates syntax and policy]
    C --> D[Review and approve]
    D --> E[Apply in staging]
    E --> F[Run service checks]
    F --> G{Promote to production}
    G -- no --> A
    G -- yes --> H[Apply in production]
    H --> I[Detect drift and open fix change]
    I --> A

Approaches and tools compared

Different tools can achieve configuration management, but they differ in operating model, complexity, and fit for scale.

OptionModelBest forTrade-offs
Manual shell scriptsImperative commands executed directly on hostsSmall, one-off tasksHard to keep idempotent; drift grows quickly
AnsibleAgentless automation (commonly over SSH/WinRM) with YAML playbooksTeams that want quick adoption and readable automationController design and inventory strategy matter at larger scale
PuppetDeclarative desired state with agent-based enforcementLarge fleets needing continuous state enforcementAgent and control-plane lifecycle adds operational overhead
ChefCode-driven automation with Ruby DSL, typically agent-basedComplex automation patterns and strong code customizationSteeper learning curve for teams unfamiliar with Ruby DSL
SaltRemote execution plus state management, event-driven capabilitiesTeams needing both orchestration and configuration controlArchitecture choices can increase design complexity

Hands-on example: baseline web server configuration with Ansible

This example installs and enables NGINX on a target host group named web. It demonstrates idempotent configuration management with a dry-run step before enforcement.

Inventory file

[web]
web-01 ansible_host=192.0.2.10 ansible_user=ubuntu
web-02 ansible_host=192.0.2.11 ansible_user=ubuntu

Playbook

---
- name: Configure web servers
  hosts: web
  become: true
  tasks:
    - name: Ensure nginx is installed
      ansible.builtin.package:
        name: nginx
        state: present

    - name: Ensure nginx service is enabled and running
      ansible.builtin.service:
        name: nginx
        enabled: true
        state: startedCode language: CSS (css)

Validate first, then apply

ansible-playbook -i inventory.ini web.yml --syntax-check
ansible-playbook -i inventory.ini web.yml --check --diff
ansible-playbook -i inventory.ini web.ymlCode language: CSS (css)

Minimal CI validation stage

stages:
  - validate

validate_config:
  stage: validate
  script:
    - ansible-playbook -i inventory.ini web.yml --syntax-check
    - ansible-playbook -i inventory.ini web.yml --checkCode language: CSS (css)

Common pitfalls and best practices

  • Pitfall: making emergency manual server edits and never backporting them. Best practice: every change goes through version control and pull request review.
  • Pitfall: applying directly to production first. Best practice: validate in CI, then stage, then promote.
  • Pitfall: treating configuration tools as ad-hoc scripting engines. Best practice: prefer idempotent resources and declarative patterns where possible.
  • Pitfall: weak inventory and host-group design. Best practice: model environments and roles explicitly to prevent accidental broad changes.
  • Pitfall: no drift checks after deployment. Best practice: schedule regular compliance runs and open fix changes automatically.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 Data Preparation Tools in 2026: Features, Pros, Cons & Comparison

Introduction Data preparation is one of the most time-consuming aspects of any data analytics project. It involves collecting, cleaning, transforming, and organizing raw data to ensure it…

Read More

Top 10 AI Low-Code Development Platforms Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI low-code development platforms are transforming how businesses build and deploy AI-driven applications. These platforms empower developers, business analysts, and even non-technical users to…

Read More

Splunk Observability Cloud vs Splunk AppDynamics vs Splunk Cloud Platform

Here’s a clear and updated comparison between Splunk Observability Cloud, Splunk AppDynamics, and Splunk Cloud Platform, highlighting their purpose, strengths, and ideal use cases: 📦 Product Overview…

Read More

Top 10 Virtualization Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction Virtualization software is one of the foundational technologies driving the IT landscape in 2026. With the growing demand for cloud computing, IT professionals and businesses are…

Read More

Top 10 Patch Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction: The Importance of Patch Management in 2026 In 2026, as cyber threats evolve and technology becomes more complex, patch management tools are critical for maintaining cybersecurity…

Read More

Top 10 Remote Monitoring & Management (RMM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction In today’s fast-paced, technology-driven world, businesses rely on the seamless functioning of their IT infrastructure. This makes Remote Monitoring & Management (RMM) tools essential for managing,…

Read More