-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't log into Switches #110
Comments
Possible please can you provide the following details: |
Hi @prasadapr, here's the info requested: Ansible Version = 2.9.17 It's a very simple playbook
I'm using AWX on docker, so the inventory and ansible.cfg files are handled by AWX/Tower. |
Hi @cesar-rickinho, as per your inputs created the environment and executed, its working. Please follow the below steps, it should work:
3.Create the inventory.yaml file Ex: [spineleaf] [datacenter:children]
[root@cent7-vm-038-040 awx]# cat os10_awx-cant_log_into_Switch_110.yaml
[root@cent7-vm-038-040 awx]# ansible-playbook -i inventory.yaml os10_awx-cant_log_into_Switch_110.yaml PLAY [datacenter] *************************************************************************************************************************************************************************************************************** TASK [Connect switch] *********************************************************************************************************************************************************************************************************** TASK [debug] ******************************************************************************************************************************************************************************************************************** PLAY RECAP ********************************************************************************************************************************************************************************************************************** [root@cent7-vm-038-040 awx]# [root@cent7-vm-038-040 awx]# ansible --version [root@cent7-vm-038-040 awx]# PLAYBOOK: os10_awx-cant_log_into_Switch_110.yaml ******************************************************************************************************************************************************************************** PLAY [datacenter] *************************************************************************************************************************************************************************************************************** TASK [Connect switch] *********************************************************************************************************************************************************************************************************** TASK [debug] ******************************************************************************************************************************************************************************************************************** PLAY RECAP ********************************************************************************************************************************************************************************************************************** [root@cent7-vm-038-040 awx]# |
In the above the alignment was changed, that's why sharing again for easy readability:
|
@cesar-rickinho, by any chance have you tried this issue with provided configs. |
@cesar-rickinho,shall we close this issue? |
Yes please, I was not able to properly troubleshoot the issue, but I believe that it's not with the module, most likely on my AWX setup |
SUMMARY
I'm trying to use the dellemc.os10 module to connect to switches and collect some information from them.
ISSUE TYPE
COMPONENT NAME
The SSH connection works fine, but when I trigger the job from AWX/Ansible Tower it fails with the error below
{
"unreachable": true,
"msg": "Failed to connect to the host via ssh: Warning: Permanently added 'xx.xx.xx.xx' (ECDSA) to the list of known hosts.\r\nwr /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\n/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\nSyntax error on line stdin:1 "/bin/sh -c 'echo ~admin && sleep 0'": Unknown command.",
"changed": false
}
I've made sure that all of the network ports are open, SSH works from that machine, I even get the error regardless of password or ssh keys.
ANSIBLE VERSION
COLLECTION VERSION
OS / ENVIRONMENT
The text was updated successfully, but these errors were encountered: