Skip to main content
junior
beginner
Infrastructure

Configuration Management Basics

Question

What is configuration management? Why is it important and what tools are commonly used?

Answer

Configuration management is the practice of automating and standardizing system configurations across environments. It ensures consistency (all servers configured the same), enables version control of configs, provides audit trails, and reduces manual errors. Common tools: Ansible (agentless, YAML), Puppet (agent-based, DSL), Chef (agent-based, Ruby), and SaltStack. CM enables infrastructure as code and is essential for managing servers at scale.

Why This Matters

Without configuration management, maintaining consistency across dozens or hundreds of servers becomes impossible. CM tools enforce desired state - if someone manually changes a config, the CM tool reverts it. This is crucial for security compliance and reproducible deployments. Ansible has become dominant due to its simplicity and agentless architecture.

Code Examples

Simple Ansible playbook

yaml

Running Ansible

bash
Common Mistakes
  • Not testing playbooks in staging before production
  • Hardcoding environment-specific values instead of using variables
  • Running as root when privilege escalation should be explicit
Follow-up Questions
Interviewers often ask these as follow-up questions
  • What is idempotency and why is it important in configuration management?
  • What is the difference between push and pull-based configuration management?
  • When would you use configuration management vs. containers?
Tags
ansible
configuration-management
iac
automation
fundamentals