From aee92093753abc1aa9b7215e31b4b1800e6a61f2 Mon Sep 17 00:00:00 2001 From: James Cote Date: Fri, 30 Nov 2018 06:42:47 -0800 Subject: [PATCH] Update set_fact doc to reflect updated caching options (#46565) * Update set_fact doc to reflect updated caching options * add note about change in precedence caused by caching --- lib/ansible/modules/utilities/logic/set_fact.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/utilities/logic/set_fact.py b/lib/ansible/modules/utilities/logic/set_fact.py index 34cb44ee80..bd5915b7cf 100644 --- a/lib/ansible/modules/utilities/logic/set_fact.py +++ b/lib/ansible/modules/utilities/logic/set_fact.py @@ -21,8 +21,9 @@ module: set_fact short_description: Set host facts from a task description: - This module allows setting new variables. Variables are set on a host-by-host basis just like facts discovered by the setup module. - - These variables will be available to subsequent plays during an ansible-playbook run, but will not be saved across executions even if you use - a fact cache. + - These variables will be available to subsequent plays during an ansible-playbook run. + - Set C(cacheable) to C(yes) to save variables across executions + using a fact cache. Variables created with set_fact have different precedence depending on whether they are or are not cached. - Per the standard Ansible variable precedence rules, many other types of variables have a higher priority, so this value may be overridden. See L(Variable Precedence Guide,../user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) for more information. - This module is also supported for Windows targets.