Comment 4 for bug 1674947

Revision history for this message
Luke Short (ekultails) wrote :

The Ansible documentation was a little confusing, making it sound like ansible_play_batch was the replacement for play_hosts. @odyssey4me pointed out in my initial patch that this might not be the case so I did some further testing and can verify that we definitely want to use ansible_play_hosts (which grabs all of the hosts from the Playbook) and not ansible_play_batch (which only grabs the name of hosts that the current task is running on).

I also tested using the deprecated play_hosts variable with Ansible 2.3 and 2.4 (from GitHub) and can confirm that it still works. It is still better for us to update this now rather than to wait for later when/if it's removed.