Ansible to loop x times

后端 未结 3 1763
你的背包
你的背包 2021-01-20 03:28

I have to do some benchmarks and loop over 10 commands 3 times (run all 10x3, not the firstx3 then the secondx3 - so run all 10x3). The 10 commands I extract from a file in

3条回答
  •  独厮守ぢ
    2021-01-20 04:14

    In addition to existing answers : instead of copy-pasting n times the include block, you can use the with_sequence instruction :

    - name: Do things
      include_tasks: subtask.yml
      with_sequence: count=3
    

提交回复
热议问题