-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
> How can I limit the amount of loops in a with_nested loop?
I still didn't find a solution for this. Maybe someone can suggest
alternative approaches if the use case is clear:
I've got two use cases where I would need an index counter within a
with_nested loop (or any other solution that gets the job done):
1) limit number of service instances based on available machine memory
basically something like:
create process instances
with_nested:
- set1
- set2
when: machine_memory / loopIndex+1 > minimalmemoryrequired
but there is no "loopIndex" that I could use..
2) assign unique TCP port to a service to prevent duplicate bindings
here is the ansible role where this would be useful for me:
https://github.com/nusenu/relayor/blob/master/tasks/configure.yml
thanks,
Nusenu
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJVBz0vAAoJEFv7XvVCELh0Zi8P/iqwRHZe5l67BDiEUZNrRPWO
xhr0uM8iKUr00zMp2WTuG6PN9ifGR0ZdNcxeojTyqiZYnzJPHWxVi4VG4KR59gOi
FUimZmuNzcvBKHFLzm4vqiy/n28qYQacXDTacBamAtoguot1ecH4RK1gwHmtZItZ
QpPBq/08x30o9rf5GHE+yeLE6x62fXIcGYVoadjqghNReZxym68szI0Np1jjByKl
vkIZ/tf5/gFZ2hkV7aMNiH9b6cMR4a6hHhP1oCk4SZ/6ERxbOTuYJoX+NZzfqCf6
hJLrJPhreyfHAaF5wSG62yrP/NWY9Clxz+5451UTS/t6qjR3bUVBG9jR6R30A0yt
bvcu4wzpaNbcMIVfx8UQTvlpljzfh6oiJMhUUxeTL8PNAz8P27OptEIc4PvNE9zJ
DE30plbsM7YLJLZT6ASPGiAMDBW6sL48hKx6XC63vSQZC1tkDp8/xSjf4kjpXwsp
DZMjliVoDBIs4oRQNwTPvJORIaYGAsIPlHzgULCA26XgVvqcKkmL89gA/y6aV068
HugIRTUjKRq0urMdMyfdiuru96qKLxKhEB4q0iBmg69udI3hcgd8xx438syOgTV1
QZ79MHnhUMqA2H2Vh3tB1pJvlopGnLRiHSt/SRmwhlc/qRXND9SAmU+8lfzvCXcq
sjuUVyXYFrz5GAxHmrwE
=pgFr
-----END PGP SIGNATURE-----