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: Concepts, Tooling, and a Practical Workflow

Configuration management is the DevOps practice of defining a desired system state (packages, services, files, users, policies) and enforcing that state consistently across servers and environments. This article is for platform, SRE, and infrastructure engineers who want a clear mental model, a tool comparison, and practical implementation patterns.

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

The original post primarily embedded a SlideShare deck. The original shortcode is preserved here:

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

What configuration management does in a DevOps stack

At its core, configuration management reduces drift between what systems should look like and what they actually look like. Instead of manually editing servers, teams define state as code and apply it repeatedly.

  • Desired state: declare the end state (for example, nginx installed and running).
  • Idempotency: safe repeated runs without unnecessary changes.
  • Version control: track who changed what and when.
  • Auditability: reviewable pull requests and change history.
  • Consistency: same baseline across dev, staging, and production.

Typical workflow from Git change to enforced state

Most teams run configuration management through Git-based change control and automated execution.

flowchart TD
    A[Engineer updates config in Git] --> B[Pull request review]
    B --> C[CI lint and syntax checks]
    C --> D{Checks pass}
    D -- No --> E[Fix and resubmit]
    D -- Yes --> F[Merge to main branch]
    F --> G[Run configuration management apply]
    G --> H[Nodes converge to desired state]
    H --> I[Drift and compliance report]

Tool comparison: Ansible, Puppet, Chef, Salt, and Terraform

Different tools can solve similar problems with different operating models. A quick comparison helps with initial selection.

ToolPrimary modelBest forKey consideration
AnsibleMostly agentless push over SSH/WinRMFast onboarding, readable YAML automationController access and execution orchestration must be planned
PuppetAgent-based pull modelLarge fleets with continuous policy enforcementOperational overhead for Puppet infrastructure and agent lifecycle
ChefAgent-based pull modelComplex policy-driven node configurationSteeper learning curve for cookbook patterns
SaltAgent-based (minion) with SSH-based optionsEvent-driven automation and remote executionArchitecture choice (master/minion vs SSH) affects operations
Terraform (adjacent)Declarative infrastructure provisioningCloud/network/resource lifecycle managementNot a full replacement for OS and in-host app configuration

Example: baseline Linux web server configuration with Ansible

The example below installs nginx, ensures it is enabled and running, and deploys a managed config file. This demonstrates the desired-state and idempotent style used in configuration management.

Inventory file

[web]
web01.example.internal
web02.example.internal

[web:vars]
ansible_user=automation

Playbook

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

    - name: Ensure nginx service is enabled and running
      service:
        name: nginx
        enabled: true
        state: started

    - name: Deploy nginx config
      copy:
        src: files/nginx.conf
        dest: /etc/nginx/nginx.conf
        owner: root
        group: root
        mode: "0644"
      notify: Restart nginx

  handlers:
    - name: Restart nginx
      service:
        name: nginx
        state: restartedCode language: JavaScript (javascript)

Execution commands

ansible-playbook -i inventory/prod.ini site.yml --check
ansible-playbook -i inventory/prod.ini site.yml

Repository structure and environment promotion

Keeping configuration code organized makes review and promotion safer. A simple layout:

cm-repo/
├── inventory/
│   ├── dev.ini
│   ├── stage.ini
│   └── prod.ini
├── group_vars/
├── roles/
├── files/
├── templates/
└── site.yml
  • Use pull requests for every change.
  • Run lint/syntax checks in CI before merge.
  • Promote the same reviewed change from dev to stage to production.
  • Record execution logs for audit and incident review.

Best practices and common pitfalls

  • Prefer small, reversible changes: large batches increase blast radius.
  • Avoid snowflake servers: if a manual fix is needed, codify it immediately.
  • Separate secrets from code: use a proper secrets manager or encrypted variable strategy.
  • Design for drift detection: schedule regular convergence checks, not only one-time setup.
  • Test in lower environments first: validate roles and modules before production rollout.

Done well, configuration management becomes a repeatable control plane for system state: consistent, reviewable, and automation-friendly.

Find Trusted Cardiac Hospitals

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

Explore Hospitals

Related Posts

How Ansible Automates Cisco IOS and IOS XE Network Devices

Introduction Managing multiple Cisco routers and switches manually can become time-consuming as a network grows. Network engineers regularly configure interfaces, check device status, update settings, and troubleshoot…

Read More

The Complete Ansible Tutorial: Concepts, Architecture, Playbooks, and Real-World Examples

Here is a comprehensive, professional-quality Ansible tutorial based on your notes, structured as a long-form guide. Every topic, term, and example is included, with deep explanations and…

Read More

Ansible Interview Questions and Answer – Part 6

What is Ansible? What is Configuration Management? Is Ansible only a tool for Configuration Management? What are the components of Ansible? How Ansible works? What are the…

Read More

Ansible Training Flow

This page walks through the Ansible training flow step by step. It starts with ad hoc commands, moves on to playbooks and finishes with roles. At each…

Read More

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

This guide explains configuration management for DevOps teams: what it solves, how it fits into delivery workflows, and how major tool options compare. It also includes a practical Ansible example you can adapt for real environments.

Read More

Infrastructure as Code: A Practical Guide for DevOps Professionals

Introduction Managing infrastructure has undergone a massive transformation over the past decade. If you started your career in the era of physical data centers, you likely remember…

Read More