Hey

Does ansible have a way of grouping multiple tasks into one (akin to a
block statement in many programming languages)? I've several tasks that
I want to (a) apply some common options to, such as sudo: yes, and (b)
do in a loop (with_items). I could put these in a separate role, but
that seems very heavyweight, and in my case I'm already inside of a role
that I'd like to be self-contained. I haven't been able to find anything
that lets me do this -- I tried hacking around it by putting an include
statement as the task, but got an error saying that using that with
with_items had been removed after being deprecated. That's more than
reasonable -- it's pretty ugly -- but I can't find a better way to do
this.

Thoughts?

-Ian

Attachment: signature.asc
Description: signature

Reply via email to