mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
doc: fix loop examples (#34991)
This commit is contained in:
parent
fe57285f9a
commit
785e888ea0
1 changed files with 2 additions and 4 deletions
|
@ -195,14 +195,12 @@ One can use a regular ``loop`` with the ``ansible_play_batch`` or ``groups`` var
|
|||
# show all the hosts in the inventory
|
||||
- debug:
|
||||
msg: "{{ item }}"
|
||||
loop:
|
||||
- "{{ groups['all'] }}"
|
||||
loop: "{{ groups['all'] }}"
|
||||
|
||||
# show all the hosts in the current play
|
||||
- debug:
|
||||
msg: "{{ item }}"
|
||||
loop:
|
||||
- "{{ ansible_play_batch }}"
|
||||
loop: "{{ ansible_play_batch }}"
|
||||
|
||||
There is also a specific lookup plugin ``inventory_hostnames`` that can be used like this::
|
||||
|
||||
|
|
Loading…
Reference in a new issue