-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify registered vs facts #45432
clarify registered vs facts #45432
Conversation
To ask to have registered variables be delegated as facts, is it an overkill? |
not something i would do under delegated facts as they are not facts |
Registered variables are valid on the host the remainder of the playbook run, which is the same as the lifetime of "facts" | ||
in Ansible. Effectively registered variables are just like facts. | ||
Registered variables are valid on the host the remainder of the playbook run, which is similar to the lifetime of "facts" in Ansible. | ||
Both registered variables and facts are host level variables, but they are not the same thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do registered variables differ from facts? Where is a user most likely to run into that difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several ways, but the main ones are:
- precedence: they follow different priorities
- caching: facts are backed by the 'configured cache plugin' vs registered vars are always just kept 'in memory'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the suggested text include the precedence and caching details?
The text "which is similar to the lifetime of "facts" in Ansible." does not clarify the validity for me.
Both registered variables and facts are host level variables, but they are not the same thing. | |
Registered variables are valid on the host the remainder of the playbook run. |
The text "but they are not the same thing." also does not help me.
Both registered variables and facts are host level variables, but they are not the same thing. | |
Both registered variables and facts are host level variables. |
I consider this is already an improvement on the text. |
431859f
to
4b88d1f
Compare
* clarify registered vs facts fixes ansible#45411 * wordsmithing
SUMMARY
fixes #45411
ISSUE TYPE
COMPONENT NAME
docs
ANSIBLE VERSION