# Newbie: Error running ansible playbook

**URL:** <https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904>\
**Category:** Ansible Project\
**Created:** [March 5, 2018, 10:40pm UTC](https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904 "2018-03-05T22:40:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishlesh\_Patel](https://avatars.discourse-cdn.com/v4/letter/v/dfb087/32.png) [@Vishlesh\_Patel](https://forum.ansible.com/u/Vishlesh_Patel)\
**Post date:** [March 5, 2018, 10:40pm UTC](https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904/1 "2018-03-05T22:40:45Z")

</div>

- hosts: CSRs  
gather\_facts: false  
connection: local

tasks:

- name: test show run  
ios\_config:  
authorize: yes  
lines:
- do show run

I have the above simple show\_run.yaml ansible playbook. While i run this playbook I am getting this error:

~/central-orchestration/csr-instance-ansible-poc \> ansible-playbook show\_run.yaml  
ERROR! conflicting action statements: ios\_config, name

The error appears to have been in ‘/Users/vishlpa4/central-orchestration/csr-instance-ansible-poc/show\_run.yaml’: line 6, column 6, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

tasks:

- name: test show run  
^ here

The error appears to have been in ‘/Users/vishlpa4/central-orchestration/csr-instance-ansible-poc/show\_run.yaml’: line 6, column 6, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

tasks:

- name: test show run  
^ here

exception type: \<class ‘ansible.errors.AnsibleParserError’\>  
exception: conflicting action statements: ios\_config, name

The error appears to have been in ‘/Users/vishlpa4/central-orchestration/csr-instance-ansible-poc/show\_run.yaml’: line 6, column 6, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

tasks:

- name: test show run  
^ here

~/central-orchestration/csr-instance-ansible-poc \>

Am I missing something here ?

Thanks  
Vishlesh

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 5, 2018, 10:43pm UTC](https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904/2 "2018-03-05T22:43:48Z")

</div>

I suspect that it is invalid YAML at that point, it is very strict  
about it's spaces.

---

<div class="post-metadata">

**Author:** ![Vishlesh\_Patel](https://avatars.discourse-cdn.com/v4/letter/v/dfb087/32.png) [@Vishlesh\_Patel](https://forum.ansible.com/u/Vishlesh_Patel)\
**Post date:** [March 5, 2018, 11:23pm UTC](https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904/3 "2018-03-05T23:23:48Z")

</div>

Hi Brian,

Thanks for the reply. checking it with yaml validation online tool and it does not show any error.

[![](https://lh3.googleusercontent.com/-OiRKwllp9wc/Wp3RVkaOMOI/AAAAAAAACGQ/_x0cmntWL2k3FW3uWeTsskGzpWGtWu6hgCLcBGAs/s1600/Screen%2BShot%2B2018-03-05%2Bat%2B6.22.27%2BPM.png)](https://lh3.googleusercontent.com/-OiRKwllp9wc/Wp3RVkaOMOI/AAAAAAAACGQ/_x0cmntWL2k3FW3uWeTsskGzpWGtWu6hgCLcBGAs/s1600/Screen%2BShot%2B2018-03-05%2Bat%2B6.22.27%2BPM.png)

---

<div class="post-metadata">

**Author:** ![Vishlesh\_Patel](https://avatars.discourse-cdn.com/v4/letter/v/dfb087/32.png) [@Vishlesh\_Patel](https://forum.ansible.com/u/Vishlesh_Patel)\
**Post date:** [March 6, 2018, 4:26am UTC](https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904/4 "2018-03-06T04:26:57Z")

</div>

Update:

Figured out an error.

I was initially getting error of packaging module missing : module\_failure for another Ansible module that installs azure VM.

TASK [azure\_rm\_virtualnetwork] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named packaging.version  
fatal: [localhost]: FAILED! =\> {“changed”: false, “module\_stderr”: “Traceback (most recent call last):\n File "/var/folders/tx/v8mw27js4vn1rzwr53dxf1y40000gn/T/ansible\_Z\_Z8rL/ansible\_module\_azure\_rm\_virtualnetwork.py", line 137, in \n from ansible.module\_utils.azure\_rm\_common import AzureRMModuleBase, CIDR\_PATTERN\n File "/var/folders/tx/v8mw27js4vn1rzwr53dxf1y40000gn/T/ansible\_Z\_Z8rL/ansible\_modlib.zip/ansible/module\_utils/azure\_rm\_common.py", line 28, in \nImportError: No module named packaging.version\n”, “module\_stdout”: “”, “msg”: “MODULE FAILURE”, “rc”: 0}

To solve it, I pip installed packaging package and update ansible.cfg to point to the dir where packaging is installed by appending that dir to

library=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

turns out that Ansible installs its own version of python and keeps its own version of site-packages. So I pip installed the package locally into Ansible’s verison of python site-packages.

Any better approach than this to solve this python dependency issues?

Thanks  
Vishlesh

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 6, 2018, 10:30pm UTC](https://forum.ansible.com/t/newbie-error-running-ansible-playbook/26904/5 "2018-03-06T22:30:01Z")

</div>

Ansible does not install it's own version of Python. Ansible DOES has  
a dependency on Python 2.6/2.7 or \>=3.5, so installing Ansible through  
most methods (pip/OS pkgmgr) can install Python, there is no real way  
to avoid this if you want a working copy unless you install the  
required Python yourself.
