Skip to content
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

Ansible 2.9.4 does not work, DNE code must be run on Ansible 2.5.4 #98

Open
ikakonyi69 opened this issue Jan 23, 2020 · 2 comments
Open

Comments

@ikakonyi69
Copy link

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.

@annegentle
Copy link
Collaborator

@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?

@annegentle
Copy link
Collaborator

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$

@annegentle annegentle changed the title Ansible does not work Ansible 2.9.4 does not work, DNE code must be run on Ansible 2.5.4 Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants