Introduction

Get introduced to state and configuration management. Also, learn how to manage infrastructure as code.

Ansible’s promise is configuration management. It’s how you move from ad-hoc and manual configuration to a consistent, reliable, and automated process. In infrastructure automation, two types of change need management:

  • state change
  • configuration change

State management

One example of a state change is restarting a service. It impacts the system without modifying the system’s configuration.

Configuration changes are the opposite. They make lasting modifications to the system, in some cases, and none in others.

Configuration management

Configuration management is how you control changes introduced, verified, and, if necessary, corrected. It is a systems engineering process for establishing and maintaining the consistency of your infrastructure through automation.

Configuration changes flow through a system in response to three events:

  • A new machine has been deployed.
  • A configuration modification has been requested.
  • Validation of the current configuration is required.

Your configuration management process should address all three of these events with a single workflow. Ansible provides several features and design patterns to support this single workflow:

  • Decoupling the Ansible code into roles.
  • Dynamic inventory sources.
  • The ability to link playbooks together in a predetermined sequence.

Infrastructure as code

Beyond the syntax and design patterns, you’ll also need a process for managing the Ansible code itself. Interestingly enough, as you start to define your infrastructure as code, the difference between infrastructure code and application code diminishes. Because of this, there is a lot of value in releasing your infrastructure code in a release pipeline model, as you would application code.

Finding the right answers is often more about knowing the right questions than having a prescribed recipe for success. As you seek the right questions to ask, it’s helpful to have an example to reference. When you begin to implement configuration management, remember that it is a system. And a system involves

  • Processes
  • People
  • Automation

Destroyed Infrastructure
In case you deleted the Ansible development environment, make sure to re-deploy the infrastructure for AWS and Azure by following the links.

Get hands-on with 1200+ tech skills courses.