# Ansible Yaml Editor

**URL:** <https://forum.ansible.com/t/ansible-yaml-editor/28719>\
**Category:** Ansible Project\
**Created:** [October 4, 2018, 11:02am UTC](https://forum.ansible.com/t/ansible-yaml-editor/28719 "2018-10-04T11:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maha\_Sallam](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@Maha\_Sallam](https://forum.ansible.com/u/Maha_Sallam)\
**Post date:** [October 4, 2018, 11:02am UTC](https://forum.ansible.com/t/ansible-yaml-editor/28719/1 "2018-10-04T11:02:48Z")

</div>

Hello ,  
I am new to Ansible and I am trying to follow the steps in the below links to to Install nginx and webserver but when I am copy the code as it is and run it , it gives me an error similar to “ERROR! Syntax Error while loading YAML.” although I am using online Yaml Validator and it says “YAML IS VALID”

I need Ansible/Yaml Editor when I past the code on it , it can restructure the file automatically to a valid one and adjust spaces and tabs!

- **Ansible PlayBook** copied from ([https://linuxhint.com/ansible-tutorial-beginners/](https://linuxhint.com/ansible-tutorial-beginners/)):

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [October 4, 2018, 11:39am UTC](https://forum.ansible.com/t/ansible-yaml-editor/28719/2 "2018-10-04T11:39:21Z")

</div>

Visual Studio Code from Microsoft with some ansible plugins is quite a good choice

Regards,

JYL

---

<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:** [October 4, 2018, 11:56am UTC](https://forum.ansible.com/t/ansible-yaml-editor/28719/3 "2018-10-04T11:56:52Z")

</div>

Hopefully it wont adjust tabs since tabs isn't allow to be used in indentation of YAML.

I don't know of any editors that restructure YAML/Ansible YAML on paste, but there are editors that can help in showing where the error is.  
If you are using vim there are several plugins out there, one of them is  
[https://github.com/pearofducks/ansible-vim](https://github.com/pearofducks/ansible-vim)

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [October 4, 2018, 11:57am UTC](https://forum.ansible.com/t/ansible-yaml-editor/28719/4 "2018-10-04T11:57:08Z")

</div>

[https://docs.ansible.com/ansible/latest/community/other\_tools\_and\_programs.html](https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html)
