Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

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

Team Foundation Server 2015 Installation Guide (SQL Express + Update 3)

Install Team Foundation Server 2015 using the original Microsoft download paths, with clear guidance for online, offline, and ISO-based setup. This revised guide also includes an installation workflow, command example, and practical pitfalls to avoid.

Read More

How to Access a Running Docker Container Shell: docker exec vs docker attach

Need a shell inside a running container that is already in detached mode? This updated guide shows the correct workflow, compares docker exec and docker attach, and explains when SSH does and does not make sense.

Read More

Host Your Own NuGet Feed: Local Source vs NuGet.Server vs NuGetGallery

Learn how to host a private NuGet feed using three practical approaches: a local folder source, NuGet.Server, and NuGetGallery. This revised guide includes setup steps, command examples, and a workflow diagram to help you choose the right model.

Read More

Publish NuGet Packages to NuGet.org: CLI Steps, Workflow, and CI Example

Learn how to publish a NuGet package to NuGet.org using either nuget.exe or the dotnet CLI. This revised guide includes a workflow diagram, command comparison, and a CI-friendly example.

Read More

How to Create NuGet Packages with nuget.exe (Assembly, .nuspec, and .csproj Methods)

Learn three practical ways to build NuGet packages using nuget.exe: from an existing assembly, from a convention-based folder layout, or directly from a Visual Studio project. This guide includes commands, folder conventions, token behavior, and common pitfalls.

Read More

Virtualization in DevOps: Using Vagrant, Docker, and Cloud Platforms Together

This guide explains how VM-based workflows, containers, and cloud platforms complement each other in DevOps. It includes a practical workflow, trade-off table, and command examples for day-to-day use.

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x