with_items and with_sequence used together

Is this currently possible?

There can only be 1 with_ per task, but the 2nd part is a lookup (with_), which you can stack in other ways.

with_items:

  • “{{lookup(‘sequence’, …)}}”

lookup('sequence', ....) looks very handy for something I need to implement

that is a really ugly currently (include + with_flattened +
loop_control + loop_var).

Is the use of that documented anywhere?

Seams to be only documented in the code
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/lookup/sequence.py#L43-L79