Closed indirakas closed 1 year ago
@indirakas hello, thanks for reporting this issue
@ganeshrn hi, could you please take a look? I see you added the deprecation in https://github.com/ansible-collections/community.network/pull/120 which was finally implemented by @felixfontein in https://github.com/ansible-collections/community.network/pull/440.
@indirakas for now, you can install community.network 3.3.1 where the feature was present, run:
ansible-galaxy collection install community.network:==3.3.1
However, when I tried switching to the connection: network_cli, which also involved setting ansible_network_os, I realized that
sros
isn't supported, based on this: https://docs.ansible.com/ansible/latest/network/user_guide/platform_index.html#settings-by-platform
It could be that it works, but that the docs were never updated.
However, when I tried switching to the connection: network_cli, which also involved setting ansible_network_os, I realized that
sros
isn't supported, based on this: https://docs.ansible.com/ansible/latest/network/user_guide/platform_index.html#settings-by-platformIt could be that it works, but that the docs were never updated.
I tried it with network_cli and sros as ansible_network_os, but then the error was:
PLAY [Get-config-nokia] ********************************************************
META: ran handlers
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: terminal) ansible.builtin.sros to community.network.sros
TASK [get-config-nokia : Collect show debug] ***********************************
task path: /runner/project/roles/get-config-nokia/tasks/main.yml:6
The full traceback is:
Traceback (most recent call last):
File "/usr/share/ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 58, in __getattr__
return self.__dict__[name]
KeyError: '_nonetype'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 985, in _set_plugin_options
plugin = getattr(self._connection, '_%s' % plugin_type)
File "/usr/share/ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 66, in __getattr__
raise AttributeError(
AttributeError: 'Connection' object has no attribute '_nonetype'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 58, in __getattr__
return self.__dict__[name]
KeyError: 'nonetype'
@ganeshrn hi, could you please take a look? I see you added the deprecation in #120 which was finally implemented by @felixfontein in #440.
@indirakas for now, you can install community.network 3.3.1 where the feature was present, run:
ansible-galaxy collection install community.network:==3.3.1
@Andersson007 So we did downgrade to version 3.3.1 as you suggested:
# /home/runner/.ansible/collections/ansible_collections Collection Version ----------------- ------- ansible.netcommon 4.1.0 ansible.utils 2.8.0 community.network 3.3.1
but I am getting the same error still:
TASK [get-config-nokia : Collect show debug] *********************************** task path: /runner/project/roles/get-config-nokia/tasks/main.yml:6 fatal: [lbnl59-cr6]: FAILED! => { "changed": false, "msg": "connection local support for this module has been removed use either 'network_cli' or 'ansible.netcommon.network_cli' connection" }
Hello sir, Could you fix that problem?
@Andersson007 Any update?
@Andersson007 Any update?
@indirakas i'm not a maintainer of the collection's content, so I can't fix it myself. I can help with reviewing (general things, not testing), maintaining CI and releasing the collection.
Unfortunately original stuff's authors/maintainers in most cases do not respond. The stuff needs community maintainers and any help is welcome. We have the Quick-start guide to help newcomers to submit their first pull requests. We'd be happy to answer any questions about contributing to the community collections.
This PR should address this issue https://github.com/ansible-collections/ansible.netcommon/pull/569
This PR should address this issue ansible-collections/ansible.netcommon#569
@JCTechSol thanks for the info! Closing this one. Feel free to reopen if the merged PR didn't solve the issue
SUMMARY
We upgraded ansible to the latest version 2.12, which broke sros_command module in the task with the following error: "connection local support for this module has been removed use either 'network_cli' or 'ansible.netcommon.network_cli' connection" However, when I tried switching to the connection: network_cli, which also involved setting ansible_network_os, I realized that
sros
isn't supported, based on this: https://docs.ansible.com/ansible/latest/network/user_guide/platform_index.html#settings-by-platform So which connection should I use for SROS?ISSUE TYPE
COMPONENT NAME
community.network.sros_command
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
it was supposed to pull
show debug
outputACTUAL RESULTS