Skip to content
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

Merged
merged 2 commits into from
Aug 27, 2018
Merged

vars list #43171

merged 2 commits into from
Aug 27, 2018

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Jul 23, 2018

SUMMARY

document special vars

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

docs

ANSIBLE VERSION
2.7

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 docs This issue/PR relates to or includes documentation. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jul 23, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jul 24, 2018
Copy link
Contributor

@jamescassell jamescassell left a 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
Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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'

@ansibot
Copy link
Contributor

ansibot commented Jul 31, 2018

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 9, 2018
play_hosts
Deprecated, the same as ansbile_play_batch

playbook_dir
Copy link
Contributor

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

Copy link
Member Author

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

@acozine acozine added this to To do in OLD Ansible Documentation via automation Aug 22, 2018
@acozine acozine self-assigned this Aug 22, 2018
Copy link
Contributor

@acozine acozine left a 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:

  1. Call the file special_vars.rst
  2. Put it in the reference_appendices directory, since it's not task-focused
  3. Add an anchor (.. _special_variables:)
  4. Make the link from the playbooks_variables page a :ref: instead of a :doc:

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Aug 23, 2018
(cherry picked from commit 463b85cf0bcf7a557b857d1ebd3e8bf1b693fa4c)
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 24, 2018
@acozine acozine removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Aug 27, 2018
@acozine acozine merged commit 93f5c10 into ansible:devel Aug 27, 2018
@acozine acozine moved this from To do to Backport to 2.7 in OLD Ansible Documentation Sep 17, 2018
@acozine acozine moved this from Backport to 2.7 to Done in OLD Ansible Documentation Sep 20, 2018
@bcoca bcoca deleted the doc_vars_list branch October 16, 2018 19:30
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 docs This issue/PR relates to or includes documentation. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants