How to limit hosts in AWX / Tower Job template inventory?

Posted by

When creating job templates you want to reuse the job template for multiple hosts without creating a new dynamic inventory or group every time. That’s why they have made the “limit” field. Never mentioned this field before, lol.

You can limit the collection with the following patterns:

  • 1 Host = Just the hostname
  • Multiple hosts = host1,host2,host3
  • Group = Groupname
  • Multiple Groups = Group1:Group2:Group3
  • Exclude Group in Group = Group1:!Group4
AWX Limit collection

One comment

  1. i know it is old article. but trying to see if you have run into this before.
    i have nested groups for example regions level 1 grouping, (US, UK, SG) environment type is second level (LAB, DEV, UAT, PROD). second level would have list of hosts.
    when i pass limit in job submission to Tower, how to consider both level of groups.
    if i want to run a job in LAB server in US, would i pass limit as “US:LAB”.
    thanks

Leave a Reply

Your email address will not be published. Required fields are marked *