From 435918988475cf873b4ef2cb6b78030855bacb3d Mon Sep 17 00:00:00 2001 From: jaamiller Date: Fri, 30 Oct 2015 10:50:53 +0000 Subject: [PATCH] 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. --- docsite/rst/playbooks_lookups.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docsite/rst/playbooks_lookups.rst b/docsite/rst/playbooks_lookups.rst index 9638411a1ab..d0e8e76a378 100644 --- a/docsite/rst/playbooks_lookups.rst +++ b/docsite/rst/playbooks_lookups.rst @@ -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