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

Puppet vs Chef vs Ansible vs CFEngine vs Salt: A Practical Configuration Management Guide

Originally published on 2015-08-19; fully revised and updated.

Configuration management tools help DevOps and platform teams define system state as code, apply it consistently, and reduce configuration drift across servers. This guide compares five widely used tools from the original post—Puppet, Chef, Ansible, CFEngine, and Salt—so you can evaluate fit by workflow and operational style.

Top 5 configuration management tools

What configuration management tools solve

At a high level, all five tools support a desired-state approach: you describe how systems should look, then the tool enforces and re-enforces that state.

  • Define infrastructure and system configuration as code
  • Apply consistent baselines across many nodes
  • Detect and remediate drift from intended state
  • Improve repeatability for patching, provisioning, and service setup
  • Support auditability through versioned change history

Quick comparison of the five tools

ToolExecution modelAgent modelConfiguration styleTypical strengths
PuppetPull-oriented convergence (commonly agent-driven)Usually agent-basedDeclarative manifestsMature policy management and ecosystem
ChefClient runs policies from server or local modeTypically agent-basedRuby DSL (cookbooks/recipes)Strong flexibility for complex logic
AnsiblePush-oriented task executionAgentless over SSH/WinRMYAML playbooksFast onboarding and readable automation
CFEngineAutonomous policy enforcementLightweight agent-basedPolicy languageSmall footprint and long-running compliance model
SaltRemote execution plus state enforcementCommonly minion-based (agentless modes also exist)YAML states with templatingHigh-speed orchestration and event-driven operations

Typical desired-state workflow

Even though syntax differs, operational flow is broadly similar across tools:

flowchart LR
    A[Write desired state code] --> B[Commit to version control]
    B --> C[Run lint and policy tests]
    C --> D{Validation passed}
    D -- no --> E[Fix policy and recommit]
    D -- yes --> F[Apply with selected tool]
    F --> G[Nodes converge to desired state]
    G --> H[Collect compliance and drift reports]
    H --> A

Minimal examples by tool

The examples below show common command and policy patterns for enforcing a simple web-server baseline.

Puppet

Puppet uses declarative manifests to model package, file, and service state.

package { 'nginx':
  ensure => installed,
}

service { 'nginx':
  ensure  => running,
  enable  => true,
  require => Package['nginx'],
}Code language: JavaScript (javascript)
puppet apply site.ppCode language: CSS (css)

Chef

Chef expresses desired state through Ruby-based cookbooks and recipes.

package 'nginx'

service 'nginx' do
  action [:enable, :start]
endCode language: JavaScript (javascript)
chef-client --local-mode --runlist 'recipe[base::web]'Code language: JavaScript (javascript)

Ansible

Ansible is commonly used in agentless mode over SSH (or WinRM for Windows hosts).

- name: Configure web servers
  hosts: web
  become: true
  tasks:
    - name: Install nginx
      package:
        name: nginx
        state: present
    - name: Enable and start nginx
      service:
        name: nginx
        state: started
        enabled: trueCode language: JavaScript (javascript)
ansible-playbook -i inventory.ini web.ymlCode language: CSS (css)

CFEngine

CFEngine focuses on continuous policy enforcement with lightweight agents.

# Validate and run local policy
cf-promises -f ./promises.cf
cf-agent -Kf ./promises.cfCode language: PHP (php)

Salt

Salt combines fast remote execution with declarative state management.

nginx:
  pkg.installed: []
  service.running:
    - enable: trueCode language: CSS (css)
salt 'web*' state.apply webserverCode language: JavaScript (javascript)

How to choose between them

  • Team skill set: YAML-first teams often ramp quickly on Ansible or Salt states; Ruby-heavy teams may prefer Chef.
  • Control model: Push workflows and ad-hoc execution differ from periodic pull-based convergence.
  • Fleet size and heterogeneity: Consider Linux-only vs mixed OS support and network constraints.
  • Security posture: Evaluate credential handling, transport model, and access boundaries.
  • Ecosystem and support: Module/cookbook/formula availability and commercial support options matter in production.

Best practices

  • Start with a small, version-controlled baseline (users, packages, hardening, logging).
  • Treat policy changes like software changes: PR review, linting, and test gates.
  • Use idempotent resources and avoid imperative shell steps when native modules exist.
  • Roll out in stages (dev, staging, production) with clear rollback procedures.
  • Track drift and failed runs as operational signals, not just deployment events.

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

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

Puppet Training Agenda: A Practical Roadmap from Basics to Real-World Automation

This revised guide converts the original Puppet course outline into a clear learning path for DevOps and platform teams. It covers architecture, run cycle, hands-on manifests, ecosystem tools, and common implementation pitfalls.

Read More

Chef Training Roadmap for DevOps Engineers: Course Tracks, Lab Workflow, and Practical Commands

This guide turns a promotional Chef training post into a practical roadmap for engineers. Compare course levels, understand the learning workflow, and use hands-on commands you can run in a lab.

Read More

Server Configuration Monitoring and Diagnostics: A Practical Drift-Detection Workflow

Learn how to monitor server configuration drift and run fast diagnostics when something changes unexpectedly. This guide gives a practical workflow, approach comparison, and command examples you can adapt to your environment.

Read More

DevOps Tools Collection: A Practical Guide to CI, SCM, Monitoring, and Platform Choices

This revised guide turns the original link collection into a structured DevOps resource map. Use it to navigate tool categories, compare adoption models, and bootstrap a practical toolchain.

Read More

Puppet Training Roadmap for DevOps and System Administrators

This revised guide turns the original Puppet course post into a practical training roadmap for DevOps and sysadmin teams. It covers what to learn, how Puppet runs work, key commands to practice, and how to structure a 1-day or 2-day workshop.

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Puja kushwaha
Puja kushwaha
28 days ago

The best configuration management tool depends on the team’s setup and daily needs. It is worth comparing ease of use, scalability, platform support, and how each tool handles secrets. Teams should also check how well a tool fits their current CI/CD pipeline. Testing a small set of servers first can reveal gaps before wider adoption. Consistent testing and clear change tracking help keep systems stable as infrastructure grows.

1
0
Would love your thoughts, please comment.x
()
x