We want to use ansible to connect to a managed device. We have created a
host_var file with the username and the password. Here is the
host_var/mydevice file:
---
username: myuser
password: secret#secret
We used below ansible command to connect to mydevice:
ansible mydevice -vvvv -u myuser -m raw -a "ping 1.2.3.4"
However, we are getting the authentication error like below:
mydevice | UNREACHABLE! => {
"changed": false,
"msg": "Failed to authenticate: Authentication failed.",
"unreachable": true
}
When we connect to mydevice using ssh connection, we type in the password
and the device accepts it without problem. We are able to connect.
When add -k switch to ansible command, type in the password, getting the
same authentication failure.
Also tried using back slash symbol '\' and double back slash symbol '\\'
before '#' symbol. Does NOT work either.
Is it because the '#' symbol issue? How do we escape it?
Thank you,
- Xinhuan
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b6aa328f-7629-4912-a26e-fb9061737b1en%40googlegroups.com.