Ansible Yaml Editor

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!

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

Regards,

JYL

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://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html