# cryptic errors nxos\_config

**URL:** <https://forum.ansible.com/t/cryptic-errors-nxos-config/23520>\
**Category:** Ansible Project\
**Created:** [January 20, 2017, 10:53pm UTC](https://forum.ansible.com/t/cryptic-errors-nxos-config/23520 "2017-01-20T22:53:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Marquez](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@Eric\_Marquez](https://forum.ansible.com/u/Eric_Marquez)\
**Post date:** [January 20, 2017, 10:53pm UTC](https://forum.ansible.com/t/cryptic-errors-nxos-config/23520/1 "2017-01-20T22:53:36Z")

</div>

I'm troubleshooting why I keep getting this cryptic errors when I'm attempting to use nxos\_config  
Ansible Version:  
ansible 2.2.0.0  
&nbsp;&nbsp;config file = /home/emarq/Solutions.Network.Automation/MAS/Ansible/cisco/nexus/ansible.cfg  
&nbsp;&nbsp;configured module search path = Default w/o overrides  
Ansible.cfg  
[defaults]  
hostfile=ansible.hosts  
host\_key\_checking=False

Errors:  
ansible-playbook nexus\_apply\_acl.yml --limit rr1-s11-r01-3172hl-1-1b -vvvvv -t deploy  
Using /home/emarq/Solutions.Network.Automation/MAS/Ansible/cisco/nexus/ansible.cfg as config file  
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/\_\_init\_\_.pyc

PLAYBOOK: nexus\_apply\_acl.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
4 plays in nexus\_apply\_acl.yml

PLAY [Setup Directories] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
..  
...  
...

PLAY [deploy configs] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py  
\<10.10.236.98\> ESTABLISH LOCAL CONNECTION FOR USER: emarq  
\<10.10.236.98\> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121 `" && echo ansible-tmp-1484952187.34-169613523613121="` echo $HOME/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121 `" ) && sleep 0'  
\<10.10.236.98\> PUT /tmp/tmpjfMrVn TO /home/emarq/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121/setup.py  
\<10.10.236.98\> EXEC /bin/sh -c 'chmod u+x /home/emarq/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121/ /home/emarq/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121/setup.py && sleep 0'  
\<10.10.236.98\> EXEC /bin/sh -c '/usr/bin/python /home/emarq/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121/setup.py; rm -rf "/home/emarq/.ansible/tmp/ansible-tmp-1484952187.34-169613523613121/" \> /dev/null 2\>&1 && sleep 0'  
ok: [rr1-s11-r01-3172hl-1-1b]

TASK [deployNxosConfig : execute in config mode] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/emarq/Solutions.Network.Automation/MAS/Ansible/cisco/nexus/roles/deployNxosConfig/tasks/main.yml:5  
An exception occurred during task execution. The full traceback is:  
Traceback (most recent call last):  
&nbsp;&nbsp;File "/usr/lib/python2.7/dist-packages/ansible/executor/task\_executor.py", line 119, in run  
&nbsp;&nbsp;&nbsp;&nbsp;res = self.\_execute()  
&nbsp;&nbsp;File "/usr/lib/python2.7/dist-packages/ansible/executor/task\_executor.py", line 490, in \_execute  
&nbsp;&nbsp;&nbsp;&nbsp;result = self.\_handler.run(task\_vars=variables)  
&nbsp;&nbsp;File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/net\_config.py", line 45, in run  
&nbsp;&nbsp;&nbsp;&nbsp;self.\_handle\_template()  
&nbsp;&nbsp;File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/net\_config.py", line 90, in \_handle\_template  
&nbsp;&nbsp;&nbsp;&nbsp;if os.path.isabs(src) or urlparse.urlsplit('src').scheme:  
&nbsp;&nbsp;File "/usr/lib/python2.7/posixpath.py", line 54, in isabs  
&nbsp;&nbsp;&nbsp;&nbsp;return s.startswith('/')  
AttributeError: 'list' object has no attribute 'startswith'

fatal: [rr1-s11-r01-3172hl-1-1b]: FAILED! =\> {  
&nbsp;&nbsp;&nbsp;&nbsp;"failed": true,  
&nbsp;&nbsp;&nbsp;&nbsp;"msg": "Unexpected failure during module execution.",  
&nbsp;&nbsp;&nbsp;&nbsp;"stdout": ""  
}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to retry, use: --limit @/home/emarq/Solutions.Network.Automation/MAS/Ansible/cisco/nexus/nexus\_apply\_acl.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
rr1-s11-r01-3172hl-1-1b : ok=4 changed=0 unreachable=0 failed=1

Playbook  
# connect to the switch and apply to the running-config.  
- name: deploy configs  
&nbsp;&nbsp;hosts:  
&nbsp;&nbsp;&nbsp;&nbsp;- basetortemplate  
&nbsp;&nbsp;roles:  
&nbsp;&nbsp;&nbsp;&nbsp;- deployNxosConfig  
&nbsp;&nbsp;remote\_user: admin  
&nbsp;&nbsp;gather\_facts: no  
&nbsp;&nbsp;connection: local  
&nbsp;&nbsp;vars:  
&nbsp;&nbsp;&nbsp;&nbsp;cli:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host: "{{ ansible\_host }}"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transport: cli  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username: admin  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssh\_keyfile: /srv/tftpboot/masd-rsa.pub  
&nbsp;&nbsp;tags: deploy

Roles/deployNxosConfig/main.yml
