I search since 2 days but I don't find any solution:
I have 2 yaml files :
Master.yml:
values.yml:
I try to catch hostname1 and hostname2's list using command like *msg"{{ firewall.port.{{ansible_hostname}} }}"*.
The problem is that {{ansible_hostname}} is a string value and "firewall.port" is a yaml_path value. It's not the same
type of variable.
So I can't display hostname1 and hostname2 list values using "firewall.port.{{ansible_hostname}}
You can't wrap Jinja inside Jinja, but you can try to use either vars or Python method: