Hi,
we are using Ansible to update a flied of more than 60000 devices. Since linear or free strategy are taking a long time to finish depending on the batch size we define, we were looking for a faster strategy. I found out this post in github, which introduce a new strategy “host_pinned”. i reproduced the code writing in the post. The results where as follow:
To explain the setup, I used 10 hosts in which 2 are slower than the rest with a batch size of 2.
- When setting up the strategy to linear, the behavior changed à The execution of the next task will only start when the current task will finish for all hosts in the batch used.
- When setting up the strategy to free, the behavior changed à The execution of tasks are independent for each host. BUT if one host finishes and the other is still executing (the slower ones), Ansible will still wait for all hosts in the batch to finish in order to move to the next batch.
- When setting up the strategy to host_pinned, the behavior is exactly the same as free
For us the expected outcome will be, in case a slow host is encountered Ansible will not wait for it to finish in order to move to the next batch. Instead it will replace the finished host from the current batch with the next host from the next batch.
Did we misunderstood the host_pinned strategy? Can you give me some guidance in how to implement our approach using Ansible?
regards,
Ben