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: --- all: vars: ansible_connection: ssh ansible_user: pibco children: tibco: vars: tibco_user: pibco tibco_group: pibgrp ansible_ssh_pass: Maddy1600 hosts: tomlap01195.: tibco_tea: vars: tibco_user: pibco tibco_group: pibgrp ansible_ssh_pass: Maddy1600 hosts: tomlap04090.corp: local: hosts: localhost: ansible_connection: local -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2B5G-C8-xD7-iYAvyS095kwooB2fa5i%2Ba3zsjhFdxvgbXt1JnA%40mail.gmail.com.
