Open ikakonyi69 opened 4 years ago
@kiskander Can you take a look at the dCloud Pod and see if the code/Ansible setup needs to change to avoid this error on Ansible's latest version?
Pasting in the content of the zip file for review.
Shows the "invalid connection specified, expected connection=local, got network_cli"} message:
Ansible problems:
IKAKONYI-M-30AM:intro-ansible ikakonyi$ ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml
PLAY [Sample IOS show version for Ansible 2.5] *****************************************************************************************************
TASK [GATHERING FACTS] *****************************************************************************************************************************
fatal: [198.18.134.11]: FAILED! => {"changed": false, "failed": true, "msg": "invalid connection specified, expected connection=local, got network_cli"}
fatal: [198.18.134.12]: FAILED! => {"changed": false, "failed": true, "msg": "invalid connection specified, expected connection=local, got network_cli"}
to retry, use: --limit @/Users/ikakonyi/Git/dnav3-code/intro-ansible/ansible-02-ios-modules/02-ios_command_show.retry
PLAY RECAP *****************************************************************************************************************************************
198.18.134.11 : ok=0 changed=0 unreachable=0 failed=1
198.18.134.12 : ok=0 changed=0 unreachable=0 failed=1
IKAKONYI-M-30AM:intro-ansible ikakonyi$ ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml
PLAY [Sample IOS show version for Ansible 2.5] *****************************************************************************************************
TASK [GATHERING FACTS] *****************************************************************************************************************************
fatal: [198.18.134.11]: FAILED! => {"changed": false, "failed": true, "msg": "invalid connection specified, expected connection=local, got network_cli"}
fatal: [198.18.134.12]: FAILED! => {"changed": false, "failed": true, "msg": "invalid connection specified, expected connection=local, got network_cli"}
to retry, use: --limit @/Users/ikakonyi/Git/dnav3-code/intro-ansible/ansible-02-ios-modules/02-ios_command_show.retry
PLAY RECAP *****************************************************************************************************************************************
198.18.134.11 : ok=0 changed=0 unreachable=0 failed=1
198.18.134.12 : ok=0 changed=0 unreachable=0 failed=1
——————————————————————————————————
IKAKONYI-M-30AM:intro-ansible ikakonyi$ ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml
PLAY [Sample IOS show version for Ansible 2.5] *****************************************************************************************************
TASK [GATHERING FACTS] *****************************************************************************************************************************
fatal: [198.18.134.11]: FAILED! => {"changed": false, "failed": true, "msg": "invalid connection specified, expected connection=local, got network_cli"}
fatal: [198.18.134.12]: FAILED! => {"changed": false, "failed": true, "msg": "invalid connection specified, expected connection=local, got network_cli"}
to retry, use: --limit @/Users/ikakonyi/Git/dnav3-code/intro-ansible/ansible-02-ios-modules/02-ios_command_show.retry
PLAY RECAP *****************************************************************************************************************************************
198.18.134.11 : ok=0 changed=0 unreachable=0 failed=1
198.18.134.12 : ok=0 changed=0 unreachable=0 failed=1
IKAKONYI-M-30AM:intro-ansible ikakonyi$ ansible-playbook ansible-03-netconf-config/03-ntp_create.yaml
PLAY [NETCONF create NTP server] *******************************************************************************************************************
TASK [set_fact] ************************************************************************************************************************************
ok: [198.18.134.11]
ok: [198.18.134.12]
TASK [Define NTP server 10.111.10.66 with NETCONF] *************************************************************************************************
fatal: [198.18.134.11]: FAILED! => {"failed": true, "msg": "Privilege escalation method not found: enable"}
fatal: [198.18.134.12]: FAILED! => {"failed": true, "msg": "Privilege escalation method not found: enable"}
to retry, use: --limit @/Users/ikakonyi/Git/dnav3-code/intro-ansible/ansible-03-netconf-config/03-ntp_create.retry
PLAY RECAP *****************************************************************************************************************************************
198.18.134.11 : ok=1 changed=0 unreachable=0 failed=1
198.18.134.12 : ok=1 changed=0 unreachable=0 failed=1
IKAKONYI-M-30AM:intro-ansible ikakonyi$
Hi,
We have delivered DevNet Express training. Everything worked fine, except IOS-XE config management with Ansible. It worked perfectly during the dry runs, but not during the real event. I realized that Ansible version (what PIP installs) was upgraded from 2.5.4 to 2.9.4.
In summary, dry run worked fine with 2.5.4, but it failed with 2.9.4.
DevNetNotes_Ansible.zip
Attached file shows the problems. IOS Modules produced a different error ("invalid connection specified, expected connection=local, got network_cli"} ) than Netconf Module (msg": "Privilege escalation method not found: enable").
Ansible ran on the CentOS workstation of the PoD, not on local machines.