Hello Everyone - I am aware we can use with_items and loop methods to create a iterative loops in Ansible. Is there a logic to use kind of “for loops”
For example, i want to execute one Cisco command in the same Router continuously for 10 times … How to do this in Ansible? i am looking some thing like " range" command in python
Currently i use hard way of manually entering the command multiple times
-
name: clear session
ios_commands:
commands: -
clear counters
-
clear counters
-
clear counters
-
clear counters
regards,RB