Ignore the report, I found the error by myself ;-/
No bug! No feature!

cheers 
     Ulli

Am Samstag, 27. Februar 2016 20:21:30 UTC+1 schrieb Ulrich Hochholdinger:
>
> Hi,
> I'm experiencing a strange phenomenon with the block statement. If I 
> rearrange a when statement I get syntax error. But the data-structure of 
> both playbooks is the same:
>
> Play that works:
>
> ---
> - hosts: localhost
>   connection: local
>   tasks:
>   - block:
>       - debug: msg="The Message"
>     when: true
>
>
> Same play only lines resorted throws error:
> The "with" line arranged directly under the "block" line. Since it's a 
> dictionary there should be no difference?
>
> ---
> - hosts: localhost
>   connection: local
>   tasks:
>   - block:
>     when: true
>       - debug: msg="The Message"
>
>
> ============================= output ======================
> uhochholdinger@xelo:~$ ansible-playbook -i localhost, block_test.yml 
> ERROR! Syntax Error while loading YAML.
>
>
> The error appears to have been in '/home/uhochholdinger/block_test.yml': 
> line 7, column 14, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>     when: true
>       - debug: msg="The Message"
>              ^ here
> ===========================================================
>
>
> Bug or feature?
>
> Cheers
>       Ulli
>
> PS:
> uhochholdinger@xelo:~$ ansible --version
> ansible 2.0.0.2
>
>

-- 
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/76cd1c00-d3a2-4b63-acc1-3bf87622e62e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to