From f178c49c02e0dc215850c10abc8e87635db221bd Mon Sep 17 00:00:00 2001 From: Caleb Collins-Parks <46505081+caleb15@users.noreply.github.com> Date: Tue, 5 Nov 2019 13:25:15 -0800 Subject: [PATCH] Add warning about skipped vars (#63599) --- docs/docsite/rst/user_guide/playbooks_conditionals.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docsite/rst/user_guide/playbooks_conditionals.rst b/docs/docsite/rst/user_guide/playbooks_conditionals.rst index d07d942de49..077d676bf18 100644 --- a/docs/docsite/rst/user_guide/playbooks_conditionals.rst +++ b/docs/docsite/rst/user_guide/playbooks_conditionals.rst @@ -69,6 +69,7 @@ decide to do something conditionally based on success or failure:: .. note:: both `success` and `succeeded` work (`fail`/`failed`, etc). +.. warning:: You might expect a variable of a skipped task to be undefined and use `defined` or `default` to check that. **This is incorrect**! Even when a task is failed or skipped the variable is still registered with a failed or skipped status. See :ref:`registered_variables`. To see what facts are available on a particular system, you can do the following in a playbook::