From dea9644d212b753391a199a8271e2c331ae851cb Mon Sep 17 00:00:00 2001 From: Remon van de Kamp Date: Wed, 29 May 2019 19:24:13 +0200 Subject: [PATCH] Use correct variable for run_once regardless of batch example (#57077) Changes example to `when: inventory_hostname == ansible_play_hosts_all[0]` to really run run_once regardless of serial. --- docs/docsite/rst/user_guide/playbooks_delegation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docsite/rst/user_guide/playbooks_delegation.rst b/docs/docsite/rst/user_guide/playbooks_delegation.rst index e00f2a82f42..ff877dffcbb 100644 --- a/docs/docsite/rst/user_guide/playbooks_delegation.rst +++ b/docs/docsite/rst/user_guide/playbooks_delegation.rst @@ -273,7 +273,7 @@ As always with delegation, the action will be executed on the delegated host, bu .. note:: When used together with "serial", tasks marked as "run_once" will be run on one host in *each* serial batch. If it's crucial that the task is run only once regardless of "serial" mode, use - :code:`when: inventory_hostname == ansible_play_hosts[0]` construct. + :code:`when: inventory_hostname == ansible_play_hosts_all[0]` construct. .. note:: Any conditional (i.e `when:`) will use the variables of the 'first host' to decide if the task runs or not, no other hosts will be tested.