ansible-template

How to output loop.index in jinja

How to output loop.index in jinja Question: I want to be able to output the loop.index iteration to my template , i am using ansible and i have template file.j2 and inventory file have the below group [all_servers] app01 ansible_host=10.10.1.100 app02 ansible_host=10.10.1.102 app03 ansible_host=10.10.1.103 app04 ansible_host=10.10.1.104 app05 ansible_host=10.10.1.105 app06 ansible_host=10.10.1.106 I have jinja file inside …

Total answers: 1