Hi
I used containerlab to set up a small topology with a few FRR routers 
running as Docker containers. Accordingly, I set ansible_connection: 
Docker. However, when I run the following playbook:

- name: testing facts
hosts: routers
tasks:
- name: Do not collect hardware facts
frr.frr.frr_facts:
gather_subset:
- config

 I get the following error:
An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: AssertionError: socket_path must be a value
fatal: [172.20.20.5]: FAILED! => {"changed": false, "module_stderr": 
"Traceback (most recent call last):\n  File 
\"/root/.ansible/tmp/ansible-tmp-1626200560.5446706-211173012575608/AnsiballZ_frr_facts.py\",
 
line 102, in <module>\n    _ansiballz_main()\n  File 
\"/root/.ansible/tmp/ansible-tmp-1626200560.5446706-211173012575608/AnsiballZ_frr_facts.py\",
 
line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, 
ANSIBALLZ_PARAMS)\n  File 
\"/root/.ansible/tmp/ansible-tmp-1626200560.5446706-211173012575608/AnsiballZ_frr_facts.py\",
 
line 40, in invoke_module\n    
runpy.run_module(mod_name='ansible_collections.frr.frr.plugins.modules.frr_facts',
 
init_globals=None, run_name='__main__', alter_sys=True)\n  File 
\"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return 
_run_module_code(code, init_globals, run_name, mod_spec)\n  File 
\"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    
_run_code(code, mod_globals, init_globals,\n  File 
\"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, 
run_globals)\n  File 
\"/tmp/ansible_frr.frr.frr_facts_payload_dcxvzx4f/ansible_frr.frr.frr_facts_payload.zip/ansible_collections/frr/frr/plugins/modules/frr_facts.py\",
 
line 425, in <module>\n  File 
\"/tmp/ansible_frr.frr.frr_facts_payload_dcxvzx4f/ansible_frr.frr.frr_facts_payload.zip/ansible_collections/frr/frr/plugins/modules/frr_facts.py\",
 
line 410, in main\n  File 
\"/tmp/ansible_frr.frr.frr_facts_payload_dcxvzx4f/ansible_frr.frr.frr_facts_payload.zip/ansible_collections/frr/frr/plugins/modules/frr_facts.py\",
 
line 134, in __init__\n  File 
\"/tmp/ansible_frr.frr.frr_facts_payload_dcxvzx4f/ansible_frr.frr.frr_facts_payload.zip/ansible_collections/frr/frr/plugins/module_utils/network/frr/frr.py\",
 
line 18, in get_capabilities\n  File 
\"/tmp/ansible_frr.frr.frr_facts_payload_dcxvzx4f/ansible_frr.frr.frr_facts_payload.zip/ansible/module_utils/connection.py\",
 
line 121, in __init__\nAssertionError: socket_path must be a value\n", 
"module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the 
exact error", "rc": 1}

I tried ansible_connection: network_cli, but that tries to connect to port 
22, and SSH server isn't running on the FRR containers. Is there a way to 
direct Ansible to use vtysh to connect to the containers?

Thanks and best regards
Saqib

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7d931dd7-ef47-484c-80d6-1bcb2847cc3dn%40googlegroups.com.

Reply via email to