yaml syntax error (Ansible playboook) : I'm new to ansible and yaml, so was just practicing to write a playbook that installs apache. but I get the below error : 
"

The offending line appears to be:

    tasks:
         - name: command to install apache
           ^ here

here is my yaml code :

        ---
        - hosts: all
          tasks:
             - name: command to install apache
               sudo: yes
               yum: name=httpd state=latest
               service: name=httpd state=running
what could be wrong here ? have been trying for more than 1 hour.please help.
