Vagrant: Poor Documentation in Ansible inventory_path option without reference to implicit ansible.limit

Created on 13 Apr 2018  ยท  2Comments  ยท  Source: hashicorp/vagrant

According to the documentation present at : https://www.vagrantup.com/docs/provisioning/ansible_intro.html

Under section:
Static Inventory

One can read:
"The second option is for situations where you would like to have more control over the inventory management. With the inventory_path option, you can reference a specific inventory resource (e.g. a static inventory file, a dynamic inventory script or even multiple inventories stored in the same directory). Vagrant will then use this inventory information instead of generating it."

However one should read:
"The second option is for situations where you would like to have more control over the inventory management. With the inventory_path option, you can reference a specific inventory resource (e.g. a static inventory file, a dynamic inventory script or even multiple inventories stored in the same directory). Vagrant will then use this inventory information instead of generating it.

Note: This option doesn't override ansible implicit command defining --limit "TheMachineProvisioned", limiting the playbook defined to this machine name. To allow for the playbook to have access to all machines, please declare in your ansible provision block: ansible.limit = "all"
"

This is because of the implicit ansible.limit, that should be either documented under this section, or overriden if using the ansible.inventory_path, if the user has a bad inventory file, let him find out.

This reminds me of the opposite of one of Python's mantras - Explicit is better than implicit.

documentation enhancement provisioneansible task-small

Most helpful comment

I bumped into this myself, I could work on this.

All 2 comments

I bumped into this myself, I could work on this.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hesco picture hesco  ยท  3Comments

Cbeck527 picture Cbeck527  ยท  3Comments

rrzaripov picture rrzaripov  ยท  3Comments

janw-me picture janw-me  ยท  3Comments

lebogan picture lebogan  ยท  3Comments