After resetting to the specified commit id , the behaviour has changed, but it’s still not doing the right thing.
$ git reset --hard 339c05bb88a2ab6d3585c45c7a61812ed8e0af5b~1
HEAD is now at ac16efe Fix cowsay! Moo.
$ ansible-playbook -i ./hosts.ini ./test.yaml
PLAY [foobar] *********************
GATHERING FACTS *********************
fatal: [foobar] => {‘msg’: ‘FAILED: %d format: a number is required, not str’, ‘failed’: True}
TASK: [uptime] *********************
FATAL: no hosts matched or all hosts have already failed – aborting
PLAY RECAP *********************
foobar : ok=0 changed=0 unreachable=1 failed=0
Michael DeHaan wrote:
Your pull request breaks some other behaviors that are important with
delegated hosts, I'll review it and see what changes I may want to
make.
It doesn't really break any of that, as that doesn't work either as-is...
Daniel
Patience, please.
I'll let you know when I've had a time to look at it properly.
Ok, I’ve done a fresh checkout this morning (HEAD at 6aafb42). The error I’m getting (see the quote below - %d format etc.) is because that ansible_ssh_port is stored as a string instead of an integer as paramiko/ssh expect, thus the exception.
I’m not gonna send a pull request because I don’t know the implications of this change, but I’ve fixed it by changing Host.set_variable in lib/ansible/inventory/host.py to:
def set_variable(self, key, value):
if key == ‘ansible_ssh_port’:
value = int(value)
self.vars[key]=value
And yeah, it’s ugly. But it seems to work.
Hmm. Please paste the traceback, or better yet, file a ticket with
the traceback, and I'll look at it tonight.