I am trying to run this simple task where I want to increment counter for “{{ esb_name }}ESB?” like “ABC_ESB_01, ABC_ESB_02 …etc” until the loop is over. How do I do that ? I tried nested and other loops but was not able to do it. Any suggestions ?
Not pretty, but you could try this
- debug:
msg: msg: "./client -a 8101 -h localhost -u admin -p admin 'fabric:container-create-child --profile {{ esb_name }}_CAML_PRFL {{ fuseesbdomhosts[item | int] }} {{ esb_name }}_ESB_{% if item | int > 9 %}{{ item }}{% else %}0{{ item }}{% endif %}'"
with_sequence: start=0 end={{ groups['fuseesbdomhosts'] | length -1 }}
Thanks!