Search⌘ K
AI Features

Use Groups

Explore how to organize your infrastructure using groups within Ansible inventories. Understand grouping hosts by environment, location, and function to simplify management. Learn to create group variables and target specific groups in playbooks for efficient automation.

When you talk about your infrastructure, you need to categorize it into layers.

Categories

At the highest level, hosts are grouped by the

  • Environment
  • Location

Environment

An environment is a collection of hosts that provide a service for either internal customers or external customers—for example, development, staging, and production.

Location

Location is where the hosts are running physically. Location breaks down into region and region into datacenters.

Your infrastructure dictates how these layers are defined. Environment and location can be used interchangeably.

For example, the environment might be referred to as DC-Prod. You ...