Using a template for ansible_host with inventory_hostname breaks with delegation

75 views
Skip to first unread message

Maximilian Gaß

unread,
Feb 4, 2016, 12:37:23 PM2/4/16
to Ansible Project
Hello,

I have a domain that I want to be appended to all hosts in the inventory. To reduce duplication, I thought I'd set ansible_host={{inventory_hostname}}.osf.credativ.lan. 

Unfortunately, this breaks with delegation. Ansible connects to the play host, not to the host I delegated to, because of the template evaluation. I uploaded the inventory, playbook and output to a Gist: https://gist.github.com/mxey/cb5a9e6483f42ca60cbb

I found this issue on GitHub: https://github.com/ansible/ansible/issues/10781. It seems like a related problem at least, but to me it's not clear from the issue status whether it had been fixed or not.

Kind regards
Maximilian Gaß
Reply all
Reply to author
Forward
0 new messages