On Monday, 26 February 2018 17.23.45 CET Nico Sabbi wrote:
> 
> Il giorno lunedì 26 febbraio 2018 16:14:19 UTC, flowerysong ha scritto:
> >
> >
> >
> >
> > You'll note that this error is from the 'debug' task, which has neither a 
> > loop nor a 'when' clause. `item` is undefined because `item` has not been 
> > defined for that task.
> >
> > If you were attempting to apply the loop to the entire block, that is not 
> > supported.
> >
> 
> Yes, I was trying to loop the whole block, the equivalent  of
> while(something)
> {
> -1
> -2
> -3
> }
> 
> So ansible can't do it?

You can't loop block. To loop two or more tasks you would need to put it in a 
file and use include_tasks as I described.

Allowed directives for block is listed here
https://docs.ansible.com/ansible/latest/playbooks_keywords.html#block


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

Reply via email to