title: Ansible Tower/Awx - Conditionally choose instance group based on host_var
body: <p>I have 3 instance groups (eg: AA, BB, CC) and one single inventory of hosts called INVENTORY_A. There is a host_var set for all hosts called HOST_GROUP and the value can be AA, BB or CC.</p>
  <p>I want to make sure the job is executed on the respective instance group based on the hosts HOST_GROUP var.</p>
  <p>eg: if a host HOST1 in INVENTORY_A has HOST_GROUP value 'BB', then the job must be executed via instance group BB.</p>
  <p>Note: all 3 instance groups will be assigned to the inventory INVENTORY_A by default. Also the single inventory is due to technical requirement and cannot be split into 3</p>