I am trying simple ping command to esx host but keep getting this
ansible esx -m ping
ansible esxhost-m ping
esxhost | FAILED! => {
“msg”: “to use the ‘ssh’ connection type with passwords, you must install the sshpass program”
}
I am trying simple ping command to esx host but keep getting this
ansible esx -m ping
ansible esxhost-m ping
esxhost | FAILED! => {
“msg”: “to use the ‘ssh’ connection type with passwords, you must install the sshpass program”
}
ansible esx -u root -m ping -vvvv
ansible 2.10.2
config file = /Users/twong/virtualenv/ansible/vmware/ansible.cfg
configured module search path = [‘/Users/twong/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.8.6 (default, Oct 8 2020, 14:06:32) [Clang 12.0.0 (clang-1200.0.32.2)]
Using /Users/twong/virtualenv/ansible/vmware/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /Users/twong/virtualenv/ansible/vmware/hosts as it did not pass its verify_file() method
script declined parsing /Users/twong/virtualenv/ansible/vmware/hosts as it did not pass its verify_file() method
auto declined parsing /Users/twong/virtualenv/ansible/vmware/hosts as it did not pass its verify_file() method
Parsed /Users/twong/virtualenv/ansible/vmware/hosts inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible/plugins/callback/minimal.py
META: ran handlers
ESTABLISH SSH CONNECTION FOR USER: root
myesxhost | FAILED! => {
“msg”: “to use the ‘ssh’ connection type with passwords, you must install the sshpass program”
}
Please install SSHpass on your controller node.
yum install sshpass -y
but I am on osX in virtualenv
ok got it installed with this
brew install esolitos/ipa/sshpass
but when i ping my host, I get this
(ansible) xxx@xxxx vmware % ansible esx -m ping -u root --ask-pass
SSH password:
[WARNING]: No python interpreters found for host myesx (tried [‘/usr/bin/python’, ‘python3.7’, ‘python3.6’, ‘python3.5’,
‘python2.7’, ‘python2.6’, ‘/usr/libexec/platform-python’, ‘/usr/bin/python3’, ‘python’])
myesx | SUCCESS => {
“ansible_facts”: {
“discovered_interpreter_python”: “/usr/bin/python”
},
“changed”: false,
“ping”: “pong”
}