Hi,
I have a 3 tier setup, web, app and db.
Each tier has a mgmt, upper and lower network interface
I need to add the fqdn for the lower app interface in the hosts.equiv on the db server
I was doing this with IP which worked fine using
{{ hostvars[host][informix_interface][‘ipv4’][‘address’] }} {{ db_user }}
but need to change to use fqdn. This isn’t in the facts.
If I run
dig -x 192.168.24.12 +short
test-boapp-02.lower.foo.com.
I get the name i’m looking for. Just wondering how I could go about using it. As currently its in a loop in a template.
Can you set variables from commands in jinja2 templates?
Any help appreciated. I could semi hack it since I could use variables for the interface name and the domain and just build up the correct string
James