# Issue with first playbook

**URL:** <https://forum.ansible.com/t/issue-with-first-playbook/31220>\
**Category:** Ansible Project\
**Created:** [September 7, 2019, 5:57am UTC](https://forum.ansible.com/t/issue-with-first-playbook/31220 "2019-09-07T05:57:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elogateumsato](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@elogateumsato](https://forum.ansible.com/u/elogateumsato)\
**Post date:** [September 7, 2019, 5:57am UTC](https://forum.ansible.com/t/issue-with-first-playbook/31220/1 "2019-09-07T05:57:35Z")

</div>

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: all
> 
> by 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
> 
> * * *

&nbsp;

&nbsp;

if i run the command with -vvvv i get the following under ‘task’ : [https://pastebin.com/E42YxHE0](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.

&nbsp;

How do I make the error more readable?

---

<div class="post-metadata">

**Author:** ![Zolvaring](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@Zolvaring](https://forum.ansible.com/u/Zolvaring)\
**Post date:** [September 7, 2019, 7:13am UTC](https://forum.ansible.com/t/issue-with-first-playbook/31220/2 "2019-09-07T07:13:57Z")

</div>

Do you know what version of edgeos you are connecting to? The module docs for edgeos\_facts say it was tested on 1.9.7.

It looks like the module is failing but I can’t tell why it is getting the assertion error over socket\_path. I would try limiting your gather subset to see which set of facts is causing the problem you may not need them.

For making the error more readable I think the debug stdout callback will do that but I don’t think it’s going to get any more information. Unfortunately it looks like it’s a problem with the module running the target (I don’t have experience with edgeos)

---

<div class="post-metadata">

**Author:** ![elogateumsato](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@elogateumsato](https://forum.ansible.com/u/elogateumsato)\
**Post date:** [September 7, 2019, 9:24am UTC](https://forum.ansible.com/t/issue-with-first-playbook/31220/3 "2019-09-07T09:24:22Z")

</div>

I am running on build Version: v1.10.10

Here is a full debug of the connection : [https://pastebin.com/Tk8B0jHH](https://pastebin.com/Tk8B0jHH)

I’ve tried just a subset of the gather\_facts: config but still issue persists. Like the post says this is new so if you can recommend a resource to troubleshoot issues like this i’d be more than happy to research

---

<div class="post-metadata">

**Author:** ![elogateumsato](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@elogateumsato](https://forum.ansible.com/u/elogateumsato)\
**Post date:** [September 11, 2019, 8:06am UTC](https://forum.ansible.com/t/issue-with-first-playbook/31220/4 "2019-09-11T08:06:09Z")

</div>

I have the solution now…

you need to set the

`connection: network_cli`ansible\_network\_os=edgeos` `
