mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update playbooks_lookups.rst
I was caught out by the different behaviour of lookups & local tasks, and could not find the difference documented anywhere at all, so I took the liberty of proposing this change. Lookups are always relative to the role or play. Local tasks are relative to the cwd from which you execute.
This commit is contained in:
parent
479cbfc63c
commit
4359189884
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,8 @@ in Ansible, and are typically used to load variables or templates with informati
|
|||
|
||||
.. note:: Lookups occur on the local computer, not on the remote computer.
|
||||
|
||||
.. note:: Lookups are executed with a cwd relative to the role or play, as opposed to local tasks which are executed with the cwd of the executed script.
|
||||
|
||||
.. note:: Since 1.9 you can pass wantlist=True to lookups to use in jinja2 template "for" loops.
|
||||
|
||||
.. contents:: Topics
|
||||
|
|
Loading…
Reference in a new issue