# Newbie and seeing error on running yaml file to create switch config

**URL:** <https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744>\
**Category:** Ansible Project\
**Created:** [June 12, 2016, 2:22am UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744 "2016-06-12T02:22:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ansnewbie2016](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ansnewbie2016](https://forum.ansible.com/u/ansnewbie2016)\
**Post date:** [June 12, 2016, 2:22am UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744/1 "2016-06-12T02:22:31Z")

</div>

Hi ,  
I am a newbie to the ansible world and struggling with some errors I am trying to create switch configs based on the following url:

[https://pynet.twb-tech.com/blog/ansible/ansible-cfg-template.html](https://pynet.twb-tech.com/blog/ansible/ansible-cfg-template.html)

Whenever, I am running my yaml file, I see the following error:

ERROR! conflicting action statements

The error appears to have been in ‘/usr/share/ansible/NXS-TEMPLATE/roles/tor/tasks/main.yml’: line 2, column 5, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 13, 2016, 1:34pm UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744/2 "2016-06-13T13:34:18Z")

</div>

Your indentation is wrong, change it to the following,

---

<div class="post-metadata">

**Author:** ![ansnewbie2016](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ansnewbie2016](https://forum.ansible.com/u/ansnewbie2016)\
**Post date:** [June 17, 2016, 4:57am UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744/3 "2016-06-17T04:57:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![ansnewbie2016](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ansnewbie2016](https://forum.ansible.com/u/ansnewbie2016)\
**Post date:** [June 17, 2016, 5:04am UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744/4 "2016-06-17T05:04:33Z")

</div>

I still see the same error after correcting the indentation as shown below:

more roles/tor/tasks/main.yml

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [June 17, 2016, 6:45am UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744/5 "2016-06-17T06:45:18Z")

</div>

To help get the indentation right, I rely on Visual Studio Code with the yaml extension [https://marketplace.visualstudio.com/items?itemName=djabraham.vscode-yaml-validation](https://marketplace.visualstudio.com/items?itemName=djabraham.vscode-yaml-validation)

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 17, 2016, 2:17pm UTC](https://forum.ansible.com/t/newbie-and-seeing-error-on-running-yaml-file-to-create-switch-config/21744/6 "2016-06-17T14:17:33Z")

</div>

Since this seams to be correct your problem must be inn another file, maybe your playbook?
