Open Akasurde opened 4 years ago
I shall add that dellos10_system does something similar for me on ansible 2.9.13
TASK [dellemc.os10.os10_system : Provisioning system configuration for os10] ************************************************************************************************** task path: /home/wojciechk/.ansible/collections/ansible_collections/dellemc/os10/roles/os10_system/tasks/main.yml:11 The full traceback is: File "/tmp/ansible_os10_config_payload_brw7rt_o/ansible_os10_config_payload.zip/ansible_collections/dellemc/os10/plugins/module_utils/network/os10.py", line 80, in get_config return _DEVICE_CONFIGS[cmd] fatal: [lon1sw1]: FAILED! => { "changed": false, "invocation": { "module_args": { "after": null, "backup": false, "backup_options": null, "before": null, "config": null, "lines": null, "match": "line", "parents": null, "provider": null, "replace": "line", "save": false, "src": "os10_system.j2", "update": "merge" } }, "msg": "unable to retrieve current config", "stderr": "Unable to decode JSON from response to exec_command(show running-configuration). Received 'None'.", "stderr_lines": [ "Unable to decode JSON from response to exec_command(show running-configuration). Received 'None'." ] }
Would be great if someone had a look at it. It is possible this may be related to this issue: https://github.com/ansible/ansible/issues/33643
@skg-net is this something you'd be able to look at?
@skg-net is this something you'd be able to look at?
Sure we will look into it
I shall add that dellos10_system does something similar for me on ansible 2.9.13
TASK [dellemc.os10.os10_system : Provisioning system configuration for os10] ************************************************************************************************** task path: /home/wojciechk/.ansible/collections/ansible_collections/dellemc/os10/roles/os10_system/tasks/main.yml:11 The full traceback is: File "/tmp/ansible_os10_config_payload_brw7rt_o/ansible_os10_config_payload.zip/ansible_collections/dellemc/os10/plugins/module_utils/network/os10.py", line 80, in get_config return _DEVICE_CONFIGS[cmd] fatal: [lon1sw1]: FAILED! => { "changed": false, "invocation": { "module_args": { "after": null, "backup": false, "backup_options": null, "before": null, "config": null, "lines": null, "match": "line", "parents": null, "provider": null, "replace": "line", "save": false, "src": "os10_system.j2", "update": "merge" } }, "msg": "unable to retrieve current config", "stderr": "Unable to decode JSON from response to exec_command(show running-configuration). Received 'None'.", "stderr_lines": [ "Unable to decode JSON from response to exec_command(show running-configuration). Received 'None'." ] }
Would be great if someone had a look at it. It is possible this may be related to this issue: ansible/ansible#33643
Meanwhile please increase the command timeout to 60 sec and run again?
@woyteck1 , the original issue filed was MX Platform specific. The issue you have reported with os10_system, I think is because of using Ansible 2.9 with OS10 collections. The OS10 collections needs to be used with Ansible 2.10.
In case you are trying OS10 collections with Ansible 2.9, please set the following environment variable and retry. export ANSIBLE_NETWORK_GROUP_MODULES=os10
Hi @parkrish, I just tried your suggestion for environment variable and this is the output: `TASK [dellemc.os10.os10_system : Provisioning system configuration for os10] ** task path: /home/wojciechk/.ansible/collections/ansible_collections/dellemc/os10/roles/os10_system/tasks/main.yml:11 The full traceback is: Traceback (most recent call last): File "/home/wojciechk/git/auto/.venv/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 147, in run res = self._execute() File "/home/wojciechk/git/auto/.venv/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 665, in _execute result = self._handler.run(task_vars=variables) File "/home/wojciechk/.ansible/collections/ansible_collections/dellemc/os10/plugins/action/os10.py", line 87, in run out = conn.get_prompt() File "/home/wojciechk/git/auto/.venv/local/lib/python2.7/site-packages/ansible/module_utils/connection.py", line 185, in rpc raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code) ConnectionError: paramiko is not installed: No module named paramiko fatal: [lon1sw1]: FAILED! => { "msg": "Unexpected failure during module execution.", "stdout": "" }
`
I will now try upgrading ansible to 2.10
the timeout set to 30 seconds didn't help either.
@woyteck1 , The error suggests paramiko package is not installed. Please install it to resolve the error(pip install paramiko)
oh - just noticed that as well - but the good news is, that it works with ansible 2.10.rc1 as well once paramiko is installed. I must have uninstalled it and then didn't notice.
Thanks for your help!!
From @Solace7 on Jun 24, 2020 23:27
SUMMARY
ansible_net_config variable is not showing running configuration
ISSUE TYPE
COMPONENT NAME
dellos10_facts
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Host OS: CentOS 07 VM (ESXi ) Python version: 2.7.5
Tested On: Two Dell MX9116n running Dell OS 10.5.0.2.468
STEPS TO REPRODUCE
Run playbook to gather dellos10_facts.
EXPECTED RESULTS
Expected facts.ansible_facts.ansible_net_config to show running-configuration
ACTUAL RESULTS
ansible_net_config has value of "None" or ""
Copied from original issue: ansible/ansible#70282