Use play variables in hosts template

Use the variables defined in a play when resolving a host pattern.