This commit also adds a new test script (ansible-var-precedence-check.py in code-smell/) to provide us with another line of defense against precedence bugs going forward. The precedence docs state that the INI vars have a lower precedence than group/host vars files for inventory and playbooks, however that has not been the case since 2.0 was released. This change fixes that in one way, though not exactly as the docs say. The rules are: 1) INI/script < inventory dir < playbook dir 2) "all" group vars < other group_vars < host_vars So the new order will be (from the test script mentioned above): 8. pb_host_vars_file - var in playbook/host_vars/host 9. ini_host_vars_file - var in inventory/host_vars/host 10. ini_host - host var inside the ini 11. pb_group_vars_file_child - var in playbook/group_vars/child 12. ini_group_vars_file_child - var in inventory/group_vars/child 13. pb_group_vars_file_parent - var in playbook/group_vars/parent 14. ini_group_vars_file_parent - var in inventory/group_vars/parent 15. pb_group_vars_file_all - var in playbook/group_vars/all 16. ini_group_vars_file_all - var in inventory/group_vars/all 17. ini_child - child group var inside the ini 18. ini_parent - parent group var inside the ini 19. ini_all - all group var inside the ini Fixes #21845 |
||
---|---|---|
.. | ||
_static | ||
_themes/srtd | ||
js/ansible | ||
man | ||
rst | ||
rst_common | ||
.gitignore | ||
.nojekyll | ||
conf.py | ||
favicon.ico | ||
Makefile | ||
Makefile.sphinx | ||
modules.js | ||
README.md | ||
variables.dot |
Homepage and documentation source for Ansible
This project hosts the source behind docs.ansible.com
Contributions to the documentation are welcome. To make changes, submit a pull request that changes the reStructuredText files in the "rst/" directory only, and the core team can do a docs build and push the static files.
If you wish to verify output from the markup
such as link references, you may install sphinx and build the documentation by running
make viewdocs
from the ansible/docsite
directory.
To include module documentation you'll need to run make webdocs
at the top level of the repository. The generated
html files are in docsite/htmlout/.
If you do not want to learn the reStructuredText format, you can also file issues about documentation problems on the Ansible GitHub project.
Note that module documentation can actually be generated from a DOCUMENTATION docstring in the modules directory, so corrections to modules written as such need to be made in the module source, rather than in docsite source.
To install sphinx and the required theme, install pip and then "pip install sphinx sphinx_rtd_theme"