We’ve recently upgraded to 1.4.
In 1.3 this worked fine in a template
host = {{ansible_hostname}}
In 1.4.4
I’m seeing this
fatal: [localhost] => {‘msg’: “One or more undefined variables: ‘ansible_hostname’ is undefined”, ‘failed’: True}
Running
ubuntu@ip-10-0-x-x:~$ ansible -i inventory.ini localhost -m setup -c local | grep ansible_host
returns
“ansible_hostname”: “ip-10-0-200-247”,
Has something changed or are we using the wrong approach here?
Best,
Ed.