YAML syntax error (beginner)

Hello

I just started to use ansible so please bear with me. I managed to run a few basic playbooks but I am stuck with the following one (basic as well):

`

It seems like the error is pointing out that action: is not aligned with name: I’m not sure what editor you are using but perhaps you could replace all tabs with spaces and then make sure things are lined up correctly.

While this may not be the cause of your issues, the following is (or will be) an issue for you.

  • name: ensure joe is installed yum
    apt: name=joe state=latest
    when: ansible_os_family == “CentOS” or ansible_os_family == “Fedora”

change to:

  • name: ensure joe is installed yum
    yum: name=joe state=latest
    when: ansible_os_family == “CentOS” or ansible_os_family == “Fedora”

Thank you for your help. I was not aware that tabs are not allowed (I finally RTFM, that is the YAML reference).

Changing this immediately helped.