Hello All,
I am planning to use "ansible" on sandbox in Cisco Modeling lab. I have configure inventory file and ansible.cfg as well. After running below command sandbox ask me to install "sshpass". I don't have sudo credential. what should I do? Any help? How can I solve problem?
(py3venv) [developer@devbox ~]$ ansible routers -i hosts -m ping
10.10.20.175 | FAILED! => {
"msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"
}
10.10.20.176 | FAILED! => {
"msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"
}
inventor host file:
[routers]
10.10.20.175
10.10.20.176
[routers:vars]
ansible_user=XXXX
ansible_password=YYYY
ansible_connections=network_cli
ansible_network_os=iosxe
ansible_port=22
[switches]
10.10.20.177
10.10.20.178
[switches:vars]
ansible_user=cisco
ansible_password=cisco
ansible_connections=network_cli
ansible_network_os=nxos
ansible_port=22
ansible.cfg
[default]
gathering = explicit
inventory = /home/developer/hosts
retry_files_enable = False
# uncomment this to disable SSH key host checking
host_key_checking = False