Hi Folks,
Thank you for reading this.
My expectation is to get the hostname from the inventory file, please help how to get this.
Jinjafile :
teaserverurl: “http://{{tibcoteahost}}:8777/tea”
vars file :
tibco_tea_group: “{{ groups[‘tibco_tea’] | default(ansible_play_hosts) | sort }}”
tibcoteahost: >
“{% for server in tibco_tea_group -%}
{{ hostvars.get(server).ansible_all_ipv4_addresses }}
{% endfor %}”
inventory file: