Hi,
Im not finding exactly what Im trying to do, or maybe Im not getting how to accomplish this. Ive been playing with different ways to do this.
I need so set some different variable in a template.
this is content of j2 file.
---
monitoring:
-
lpmonitoring: {{ item.mon }}
lpenvironment: {{ item.env }}
When I have a run that pulls the above template I need that item.mon and item.env variable to be set accoring to which hosts: GROUP is running....
as in when I run the playbook against the hosts in group P1-CI I want the variables to be item.mon=P1 and item.env=CI and when it runs in P1-QA i want to variable to be item.mon=P1 item.env=QA
---
- name: generate lpmonitoringYaml facter file
hosts: P1-CI,P1-QA
Thanks very much