Hello!
I use zfs module for creating necessary structure.
Using “with_items” I iterate over elements in config list. It’s ok, but after all I need to unmount creating volumes.
This must be done in reverse order for preventing “busy device”.
I need something like with_items_desc.
What can you advise?
This should do the trick I believe:
with_tems: list|reverse
Look for ‘reverse’ on http://jinja.pocoo.org/docs/templates/
Serge
Hello,
The filter reverse returns a reverselistiterator and will be inappropriate here.
I suggest you to use with_items: your_liste**[::-1]**
Regards,
Newer versions of Ansible can iterate across iterators in that “with” and should not present a problem.