# Ansible strategy's host\_pinned not working as expected

**URL:** <https://forum.ansible.com/t/ansible-strategys-host-pinned-not-working-as-expected/31668>\
**Category:** Ansible Developer\
**Created:** [November 15, 2019, 10:43am UTC](https://forum.ansible.com/t/ansible-strategys-host-pinned-not-working-as-expected/31668 "2019-11-15T10:43:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben\_ra](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@ben\_ra](https://forum.ansible.com/u/ben_ra)\
**Post date:** [November 15, 2019, 10:43am UTC](https://forum.ansible.com/t/ansible-strategys-host-pinned-not-working-as-expected/31668/1 "2019-11-15T10:43:28Z")

</div>

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](https://github.com/ansible/ansible/issues/39374), 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
