On Monday, 13 November 2017 01.10.46 CET Veera wrote:
>  So , was indent was the only  problem I had?
> if so , the service module indent is  not  the exact one in my  program  
> but still it works ?

The order of the lines on the same indentation doesn't matter and some 
directive is optional like the name.
So these three is correct syntax:

  - yum:
      name: httpd
      state: latest

  - name: latest httpd version installed
    yum:
      name: httpd
      state: latest

  - yum:
      name: httpd
      state: latest
    name: latest httpd version installed


> I  am  assuming that I will follow the below steps of   yaml writing  .  
> Will it be ok?
> 
> write yaml with exact syntax
> indent as exactly as given(example) in each module
>  validate the yaml format
> validate the ansible format.

Pretty much, when the syntax is correct you have some leeway in the order the 
lines in the task is written.
My suggestion is to look at the code of other and you'll see what you think is 
more readable and stick to that form.


-- 
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/2375724.5X6HNOIMia%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to