From eebece91b13812d0ff7905e6009ee7e0856528d2 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 29 Jan 2019 16:28:18 -0500 Subject: [PATCH] add note about register + skip (#51339) * add note about register + skip fixes #27968 * Update docs/docsite/rst/user_guide/playbooks_conditionals.rst Co-Authored-By: bcoca * Update docs/docsite/rst/user_guide/playbooks_conditionals.rst Co-Authored-By: bcoca --- docs/docsite/rst/user_guide/playbooks_conditionals.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docsite/rst/user_guide/playbooks_conditionals.rst b/docs/docsite/rst/user_guide/playbooks_conditionals.rst index 72fb742bf5..4645fdbb55 100644 --- a/docs/docsite/rst/user_guide/playbooks_conditionals.rst +++ b/docs/docsite/rst/user_guide/playbooks_conditionals.rst @@ -278,6 +278,8 @@ Often in a playbook it may be useful to store the result of a given command in a it later. Use of the command module in this way can in many ways eliminate the need to write site specific facts, for instance, you could test for the existence of a particular program. +.. note:: Registration happens even when a task is skipped due to the conditional. This way you can query the variable for `` is skipped`` to know if task was attempted or not. + The 'register' keyword decides what variable to save a result in. The resulting variables can be used in templates, action lines, or *when* statements. It looks like this (in an obviously trivial example):: - name: test play