0Pricing
Ansible Academy · Lesson

constructed: Group Hosts by Tags

Build groups from cloud metadata.

Raw Hosts Are Not Enough

A flat list of EC2 instances is hard to target. You want groups like webservers or production built from each host metadata.

Two Ways to Group

You can group inside the aws_ec2 plugin with keyed_groups, or layer the constructed plugin on top for richer logic.

All lessons in this course

  1. Static Limits & the Inventory Plugin Model
  2. The aws_ec2 Inventory Plugin
  3. constructed: Group Hosts by Tags
  4. Caching & Multiple Inventory Sources
← Back to Ansible Academy