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

add note regarding {host,group}_vars directory lookup semantics #48066

Merged
merged 2 commits into from
Nov 9, 2018

Conversation

larsks
Copy link
Contributor

@larsks larsks commented Nov 4, 2018

While the 'ansible-playbook' command will look for {host,group}_vars in
both the playbook and inventory directories, the 'ansible' command
will only look in the inventory directory. This follows from a close
reading of the documentation but isn't explicit and leads to the
perhaps unexpected result that you can run both commands with the same
configuration in the same directory and get different results.

This commit adds a note to the documentation making the difference in
behavior explicit.

Closes #48065

SUMMARY

See #48065

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

docs

ANSIBLE VERSION
ansible 2.7.1
  config file = /home/lars/projects/bumoc/rhosp-director-config/playbooks-post-deploy/ansible.cfg
  configured module search path = [u'/home/lars/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/lars/projects/bumoc/rhosp-director-config/.venv/lib/python2.7/site-packages/ansible
  executable location = /home/lars/projects/bumoc/rhosp-director-config/.venv/bin/ansible
  python version = 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)]

While the 'ansible-playbook' command will look for {host,group}_vars in
both the playbook and inventory directories, the 'ansible' command
will only look in the inventory directory. This follows from a close
reading of the documentation but isn't explicit and leads to the
perhaps unexpected result that you can run both commands with the same
configuration in the same directory and get different results.

This commit adds a note to the documentation making the difference in
behavior explicit.

Closes ansible#48065
@ansibot
Copy link
Contributor

ansibot commented Nov 4, 2018

Hi @larsks, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 4, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Nov 4, 2018
@Shaps
Copy link
Contributor

Shaps commented Nov 5, 2018

shipit

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 5, 2018
@acozine acozine self-assigned this Nov 6, 2018
@acozine acozine added this to To do in OLD Ansible Documentation via automation Nov 9, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 9, 2018
@bcoca bcoca merged commit 220d224 into ansible:devel Nov 9, 2018
Ghilli3 pushed a commit to Ghilli3/ansible that referenced this pull request Nov 12, 2018
…ble#48066)

* add note regarding {host,group}_vars directory lookup semantics

While the 'ansible-playbook' command will look for {host,group}_vars in
both the playbook and inventory directories, the 'ansible' command
will only look in the inventory directory. This follows from a close
reading of the documentation but isn't explicit and leads to the
perhaps unexpected result that you can run both commands with the same
configuration in the same directory and get different results.

This commit adds a note to the documentation making the difference in
behavior explicit.

Closes ansible#48065

* incorporates bcoca feedback
mjmayer pushed a commit to mjmayer/ansible that referenced this pull request Nov 30, 2018
…ble#48066)

* add note regarding {host,group}_vars directory lookup semantics

While the 'ansible-playbook' command will look for {host,group}_vars in
both the playbook and inventory directories, the 'ansible' command
will only look in the inventory directory. This follows from a close
reading of the documentation but isn't explicit and leads to the
perhaps unexpected result that you can run both commands with the same
configuration in the same directory and get different results.

This commit adds a note to the documentation making the difference in
behavior explicit.

Closes ansible#48065

* incorporates bcoca feedback
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
…ble#48066)

* add note regarding {host,group}_vars directory lookup semantics

While the 'ansible-playbook' command will look for {host,group}_vars in
both the playbook and inventory directories, the 'ansible' command
will only look in the inventory directory. This follows from a close
reading of the documentation but isn't explicit and leads to the
perhaps unexpected result that you can run both commands with the same
configuration in the same directory and get different results.

This commit adds a note to the documentation making the difference in
behavior explicit.

Closes ansible#48065

* incorporates bcoca feedback
@acozine acozine moved this from To do to Backport to 2.7 in OLD Ansible Documentation Jan 28, 2019
@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.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Behavior of ansible vs. ansible-playbook w/r/t {host,group}_vars is unexpected
6 participants