cisco ios connect ssh error

112 views
Skip to first unread message

Sandy Hung

unread,
Jul 7, 2020, 3:33:11 AM7/7/20
to Ansible Project
I connect cisco switch run playbook show error msg
please help thanks.
fatal: [tpesw-01]: FAILED! => {
    "ansible_facts": {},
    "changed": false,
    "failed_modules": {
        "ios_facts": {
            "exception": "WARNING: The below traceback may *not* be related to the actual failure.\n  File \"/tmp/ansible_ios_facts_payload_8veYSP/ansible_ios_facts_payload.zip/ansible/module_utils/network/common/network.py\", line 229, in get_capabilities\n    capabilities = Connection(module._socket_path).get_capabilities()\n  File \"/tmp/ansible_ios_facts_payload_8veYSP/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\n    raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)\n",
            "failed": true,
            "invocation": {
                "module_args": {
                    "auth_pass": null,
                    "authorize": null,
                    "gather_network_resources": null,
                    "gather_subset": [
                        "all"
                    ],
                    "host": null,
                    "password": null,
                    "port": null,
                    "provider": null,
                    "ssh_keyfile": null,
                    "timeout": null,
                    "username": null
                }
            },
            "msg": "[Errno -2] Name or service not known"
        }
    },
    "msg": "The following modules failed to execute: ios_facts\n"
}

Srinivas Naram

unread,
Jul 7, 2020, 3:49:35 AM7/7/20
to ansible...@googlegroups.com
Are you able to connect to Cisco Switch from Ansible server via ssh ? The error says 'Connection Error'.

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7bf542cc-2a7a-45ba-b94d-9332327f7e6bn%40googlegroups.com.

sandy...@abagile.com

unread,
Jul 7, 2020, 5:20:47 AM7/7/20
to ansible...@googlegroups.com

Yes , I can connect sshbut still show error

 

 

“ssh sandy@xxxx

Password:

 

               --- xxxx Global Limited ---

 

     **** Unauthorized access is strictly prohibited *** tpesw-01#

tpesw-01#   “

 

 

fatal: [tpesw-01]: FAILED! => {

    "ansible_facts": {},

    "changed": false,

    "failed_modules": {

        "ios_facts": {

            "exception": "WARNING: The below traceback may *not* be related to t                         he actual failure.\n  File \"/tmp/ansible_ios_facts_payload_NZrxLz/ansible_ios_f                         acts_payload.zip/ansible/module_utils/network/common/network.py\", line 229, in                          get_capabilities\n    capabilities = Connection(module._socket_path).get_capabil                         ities()\n  File \"/tmp/ansible_ios_facts_payload_NZrxLz/ansible_ios_facts_payloa                         d.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\n    raise Conn                         ectionError(to_text(msg, errors='surrogate_then_replace'), code=code)\n",

            "failed": true,

            "invocation": {

                "module_args": {

                    "auth_pass": null,

                    "authorize": null,

                    "gather_network_resources": null,

                    "gather_subset": [

                        "all"

                    ],

                    "host": null,

                    "password": null,

                    "port": null,

                    "provider": null,

                    "ssh_keyfile": null,

                    "timeout": null,

                    "username": null

                }

            },

            "msg": "[Errno -2] Name or service not known"

        }

    },

    "msg": "The following modules failed to execute: ios_facts\n"

}

BR

 

 

Sandy

Srinivas Naram

unread,
Jul 7, 2020, 6:01:03 AM7/7/20
to ansible...@googlegroups.com
Username, Password is null. How are you passing user credentials ?

Would it be possible to share playbook ?

sandy...@abagile.com

unread,
Jul 9, 2020, 5:28:42 AM7/9/20
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages