ISSUE TYPE- Bug Report
ANSIBLE VERSION
ansible 2.1.0.0
CONFIGURATION
test-mac:ansible$ ansible --version
ansible 2.1.0.0
config file = /Users/balviswa//ansible.cfg
configured module search path = Default w/o overrides
OS / ENVIRONMENT
mac osx
SUMMARY
ssh to port mapping in virtualbox not connecting to right port or using right user specified in command line or hosts file
test-mac:ansible test$ ansible -vvvv -m ping pdit -ansible_user=test -ansible_port=3333
Using /Users/test/ansible/ansible.cfg as config file
SSH password:
Loaded callback minimal of type stdout, v2.0
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant on PORT 2222 TO 127.0.0.1
127.0.0.1 | UNREACHABLE! => {
“changed”: false,
“msg”: “[Errno None] Unable to connect to port 2222 on 127.0.0.1”,
“unreachable”: true
}
STEPS TO REPRODUCE1. Install ansible 2.1.0
- configure hosts file to use ansible_user= and ansible_port= to corresponding network mapping in virtual box
- Test ansible -m ping
- SSH failure
EXPECTED RESULTS
I expect ssh to use value provided in ansible_user and ansible_port instead it is using vagrant and port mapping of 2222 from another box.