Closed dsx1123 closed 1 year ago
Similar issue was seen in the mso ansible collection: https://github.com/CiscoDevNet/ansible-mso/issues/340.
There we identified it as an issue caused by the ansible.netcommon collection. A fix has been made for this in This PR fixes it https://github.com/ansible-collections/ansible.netcommon/pull/523.
You could try to install 5.0.1-dev ( install collection directly from git ) version to check if this removes the issue.
@akinross Thanks for the suggestion! I will try it out
@akinross That was it. I tested with 5.0.1-dev and it's working fine now. Thanks for the heads up!
With 5.0.0:
(ansible_py380) ➜ netcommon git:(2be63bd) git status
HEAD detached at 5.0.0
nothing to commit, working tree clean
(ansible_py380) ➜ netcommon git:(2be63bd)
(ansible_py3_9_16) ➜ dcnm_fabric git:(develop) ✗ ansible-playbook -i dcnm_hosts.yaml dcnm_tests.yaml
[WARNING]: running playbook inside collection cisco.dcnm
PLAY [dcnm] ****************************************************************************************************************************************************************
TASK [set_fact] ************************************************************************************************************************************************************
ok: [rtp-ndfc1.cisco.com]
TASK [set_fact] ************************************************************************************************************************************************************
ok: [rtp-ndfc1.cisco.com]
TASK [Test dcnm_rest module] ***********************************************************************************************************************************************
fatal: [rtp-ndfc1.cisco.com]: FAILED! => {"changed": false, "msg": {"DATA": {"error": "Internal Server Error", "path": "/rest/control/fabrics", "status": 500, "timestamp": 1679492271540}, "MESSAGE": "Internal Server Error", "METHOD": "GET", "REQUEST_PATH": "https://rtp-ndfc1.cisco.com:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics", "RETURN_CODE": 500}}
PLAY RECAP *****************************************************************************************************************************************************************
rtp-ndfc1.cisco.com : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
(ansible_py3_9_16) ➜ dcnm_fabric git:(develop) ✗
With 5.0.1-dev:
(ansible_py380) ➜ netcommon git:(main) cat galaxy.yml| grep version
version: 5.0.1-dev
(ansible_py380) ➜ netcommon git:(main)
(ansible_py3_9_16) ➜ dcnm_fabric git:(develop) ✗ ansible-playbook -i dcnm_hosts.yaml dcnm_tests.yaml
[WARNING]: running playbook inside collection cisco.dcnm
PLAY [dcnm] ****************************************************************************************************************************************************************
TASK [set_fact] ************************************************************************************************************************************************************
ok: [rtp-ndfc1.cisco.com]
TASK [set_fact] ************************************************************************************************************************************************************
ok: [rtp-ndfc1.cisco.com]
TASK [Test dcnm_rest module] ***********************************************************************************************************************************************
ok: [rtp-ndfc1.cisco.com]
PLAY RECAP *****************************************************************************************************************************************************************
rtp-ndfc1.cisco.com : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
(ansible_py3_9_16) ➜ dcnm_fabric git:(develop) ✗
Will close this issue once ansible.netcommon
version 5.0.1
is published on Galaxy.
This issue has been resolved in net common 5.0.1 and later releases. Closing this issue
Community Note
Ansible Version and collection version
DCNM version
Affected module(s)
Ansible Playbook
Debug Output
Expected Behavior
the same playbook works with any ansible.netcommon version < 5
Actual Behavior
rest module failed
Steps to Reproduce
References