doc: replace play_hosts with ansible_play_batch (#28526)
This commit is contained in:
parent
4382216e10
commit
6397e68bfd
1 changed files with 2 additions and 2 deletions
|
@ -699,7 +699,7 @@ Looping over the inventory
|
||||||
``````````````````````````
|
``````````````````````````
|
||||||
|
|
||||||
If you wish to loop over the inventory, or just a subset of it, there is multiple ways.
|
If you wish to loop over the inventory, or just a subset of it, there is multiple ways.
|
||||||
One can use a regular ``with_items`` with the ``play_hosts`` or ``groups`` variables, like this::
|
One can use a regular ``with_items`` with the ``ansible_play_batch`` or ``groups`` variables, like this::
|
||||||
|
|
||||||
# show all the hosts in the inventory
|
# show all the hosts in the inventory
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -711,7 +711,7 @@ One can use a regular ``with_items`` with the ``play_hosts`` or ``groups`` varia
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ item }}"
|
msg: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ play_hosts }}"
|
- "{{ ansible_play_batch }}"
|
||||||
|
|
||||||
There is also a specific lookup plugin ``inventory_hostnames`` that can be used like this::
|
There is also a specific lookup plugin ``inventory_hostnames`` that can be used like this::
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue