On søndag 12. november 2017 00.14.30 CET Veera Mani wrote:
> Hi all,
> 
> I am new to Ansible learning  and I   start practicing  yaml playbook 
> writings. 
> Though I am able to have a program with  correct indent, ansible-playbook  
> still pointing errors. I have no programming experience than bash scripting.

It's a valid YAML, but not a valid Ansible syntax.
You need to study the multiple examples in the documentation and pay attention 
to the indentation level used in them.


> Could someone highlight, what I am missing.
> Any  guidance to  do a search here before posting   will be much 
> appreciated.

Instead of just giving the answer I going to explain the process of checking it 
yourself.
All you task have the same error so I'm only going to take the first two ones.


>   - block:
>       - name: latest httpd version installed
>         yum:
>         name: httpd
>         state: latest
> 
> 
> 
> 
>       - name: latest firewalld version is present
>         yum:
>         name: firewalld
>         state: latest

You don't need the block here, block is to grouping task that you need common 
directives on or you need error handling. 

If you check the documentation of the yum module you'll find examples in the 
bottom[1]
Look closely at the indentation and you'll see that yours don't match.

Do that for all you task, since they all have incorrect indentation.


[1] https://docs.ansible.com/ansible/latest/yum_module.html#examples


-- 
Kai Stian Olstad

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1988130.OmVitY7JbX%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to