I have a Ubiquiti Edge Router X on my network and was playing around with running playbooks on it.
i’m trying to run the following playbook:
name: show current configuration
hosts: routers
tasks:
- name: get facts
edgeos_facts:
gather_subset: allby default (i’ve turned off strict host key checking) and run the playbook and get the following error:
root@ansible:~/My_Ansible# ansible-playbook -i router edge_facts.yml
PLAY [show current configuration] **************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************
ok: [EdgeRouter]TASK [get facts] *******************************************************************************************************************************
fatal: [EdgeRouter]: FAILED! => {“changed”: false, “module_stderr”: “Shared connection to 10.1.1.1 closed.\r\n”, “module_stdout”: “Traceback (most recent call last):\r\n File "/home/USER/.ansible/tmp/ansible-tmp-1567834372.68-68684870289821/AnsiballZ_edgeos_facts.py", line 114, in \r\n _ansiballz_main()\r\n File "/home/USER/.ansible/tmp/ansible-tmp-1567834372.68-68684870289821/AnsiballZ_edgeos_facts.py", line 106, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/home/USER/.ansible/tmp/ansible-tmp-1567834372.68-68684870289821/AnsiballZ_edgeos_facts.py", line 49, in invoke_module\r\n imp.load_module(‘main’, mod, module, MOD_DESC)\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/main.py", line 311, in \r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/main.py", line 299, in main\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/main.py", line 187, in populate\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/main.py", line 110, in populate\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/ansible_edgeos_facts_payload.zip/ansible/module_utils/network/edgeos/edgeos.py", line 74, in run_commands\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/ansible_edgeos_facts_payload.zip/ansible/module_utils/network/edgeos/edgeos.py", line 40, in get_connection\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/ansible_edgeos_facts_payload.zip/ansible/module_utils/network/edgeos/edgeos.py", line 54, in get_capabilities\r\n File "/tmp/ansible_edgeos_facts_payload_6VDe7q/ansible_edgeos_facts_payload.zip/ansible/module_utils/connection.py", line 122, in init\r\nAssertionError: socket_path must be a value\r\n”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}PLAY RECAP *************************************************************************************************************************************
EdgeRouter : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
if i run the command with -vvvv i get the following under ‘task’ : https://pastebin.com/E42YxHE0
after some googling (i’ve tried changing ControlPersist=60s
doesn’t work) While looking how to make errors more readable i found something that said in ansible.cfg
change stdout_callback = minimal
and I actually get back the data, however it still errors out.
How do I make the error more readable?