-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
vars list #43171
vars list #43171
Conversation
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.
Awesome! I've been looking for these docs for a while. Glad to see they now exist!
shipit
Special variable that allows you to 'omit' an option in a task, i.e ``- user: name=bob home={{ bobs_home|default(omit)}}`` | ||
|
||
play_hosts | ||
Deprecated, the same asn ansbile_play_batch |
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.
asn -> as
|
||
role_path | ||
The path to the dir of the currently running role | ||
|
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.
should vars
show up here, since hostvars
is above?
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.
no, vars is on my 'removal' list, its not documented for a reason
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.
Is there a proper way to get vars.keys() once vars is gone?
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.
no, but that is a misleading usage, not all vars are in 'vars'
play_hosts | ||
Deprecated, the same as ansbile_play_batch | ||
|
||
playbook_dir |
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.
Would be great to have a playbook_name
to get the filename of the running playbook. Couldn't find the equivalent functionality
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.
this pr is documenting existing feature, not for adding new ones, open a feature request for that
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.
This is fantastic content, thanks @bcoca for writing it up. I'd suggest a couple of changes:
- Call the file
special_vars.rst
- Put it in the
reference_appendices
directory, since it's not task-focused - Add an anchor (
.. _special_variables:
) - Make the link from the
playbooks_variables
page a :ref: instead of a :doc:
SUMMARY
document special vars
ISSUE TYPE
COMPONENT NAME
docs
ANSIBLE VERSION