Ansible

What is Ansible?

Ansible is an open-source automation tool that sets up and maintains servers from plain-text instructions. Red Hat develops it and sells a supported version.

Talk to an engineer Knowledge base
Rows of black server racks with status lights in a data center

What it is

An administrator writes a playbook, a YAML file listing the state each server should be in: which packages are installed, which users exist, what a configuration file contains, which services are running. Ansible reads the playbook and makes each server match it.

It is agentless. Nothing extra has to be installed on the servers it manages; Ansible connects to each one over SSH, the same way an administrator would log in to a Linux server, and runs small programs there. Most of those programs are written in Python, so the servers need Python available.

Runs are idempotent. If a server already matches the playbook, Ansible leaves it alone and reports no changes, so the same playbook can be run again safely to check for drift or to fix it.

The main pieces

  • Inventory: the list of servers Ansible manages, grouped by role or location, for example web servers and database servers.
  • Playbooks: the YAML files describing what to do to which group.
  • Roles: reusable bundles of tasks, such as a standard firewall setup, that several playbooks can share.

What a business gets from it

  • Consistent servers: every server built from the same playbook ends up configured the same way.
  • Reviewed changes: playbooks are text files, so they can live in Git, where each change is recorded and can be reviewed before it runs.
  • Faster rebuilds: a failed server can be replaced and reconfigured from the playbook instead of from memory.

Ansible and Terraform

The two are often used together. Terraform creates infrastructure, such as virtual machines, networks and cloud accounts. Ansible then configures what runs on those machines. Their jobs overlap a little, but that is the usual split.

How KawaConnect works with configuration automation

We administer Ubuntu, Debian and RHEL-family servers and keep infrastructure as code in version control. Kubernetes clusters are run with GitOps, where the cluster's configuration lives in a Git repository. Keeping configuration in files rather than in someone's head means a build can be repeated and every change has a record.

Related services

Linux server support

Administration of Ubuntu, Debian and RHEL-family servers.

Kubernetes consulting

Clusters whose configuration is kept in Git.

Proxmox consulting

The virtual machines many servers run on.

Learn more

  • Ansible documentationThe official guides and module reference for writing inventories, playbooks and roles.
  • Ansible websiteRed Hat's site for Ansible, covering the open-source project and the supported Ansible Automation Platform.
  • Ansible on WikipediaA neutral overview of how Ansible works and how it came to be part of Red Hat.

Servers set up by hand?

Tell us how your servers are built and changed today. We will show what keeping that configuration in files would involve.

Start a conversation