Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Strange behaviour when delegating to a host defined in a variable #11705
SSH connections are routed through a VM via a ProxyCommand
OS / ENVIRONMENT
Control Machine OS OSX 10.10.4
When using a variable in a delegate_to, the connection hangs.
STEPS TO REPRODUCE
This doesn't work - it eventually times out.
This works (using a hardcoded delegate host)
This also works (putting the variable into a with_items loop and referencing it in delegate_to)
I would expect all 3 examples to work the same way.
The first example fails
Also have this problem on 1.9.2 with the control host being rhel 7.1. Although for me the with_items trick doesn't work and manually specifying the host doesn't work.
using -vvv I can see the command is trying to run against the correct host but the $HOME/.ansible/tmp/ansible-tmp-* directory is never created.
I can see the remote user log into the delegated box but it doesn't appear the command is ever executed.
After re-running this multiple times I was able to get the normal
I had to remove the $HOME/.ansible/tmp folder and make sure my remote user was fully logged off of the delegated host
After deleting all traces of the old runs the delegated runs worked.
Got same problem on Ansible 1.8.4. I tried all tricks but it didn't work.
Another person got same problem:
I can confirm this problem with Ansible 2.0 (stable-2.0 branch - 3840fb2).
For example, any reference like:
not works, but if it changed to:
it works like a charm.
I've tried even tricks like:
no ways. Only
referenced this issue
Jan 26, 2017
I think this was fixed. My office is using