989eeb243f
* add tests for fail filter also tests that fail does not block inspectability * add fail filter fallback message is a bit clunky, since you can't invoke a filter without specifying an input. That is, "{{ fail }}" doesn't work, so you have to do "{{ None | fail }}" * document 'fail' filter * add changelog fragment * fail filter uses default message on Undefined or emptystring makes it slightly easier to use the default message: ```diff - "{{ None | fail }}" + "{{ '' | fail }}" ``` and the user sees a slightly more relevant message if the message itself is undefined: ```diff - The error was: {{ failmsg | fail }}: 'failmsg' is undefined + The error was: {{ failmsg | fail }}: Mandatory variable has not been overridden ``` * rebuild as the builtin `Undefined` * harmonise `hint` parameter for make_undefined with jinja * use code block for documentation item [ref](https://github.com/ansible/ansible/pull/75435#discussion_r707661035) * rename to `undef` to expose less Python into the Jinja [ref](https://github.com/ansible/ansible/pull/75435#pullrequestreview-757799031) * explicitly instantiate undefined value now that it's possible see I knew we would break something with reflection * preserve test coverage of undefined variable Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com> |
3 years ago | |
---|---|---|
.. | ||
.templates | 3 years ago | |
_static/css | 3 years ago | |
rst | 3 years ago | |
sphinx_conf | 3 years ago | |
.gitignore | 4 years ago | |
.nojekyll | 8 years ago | |
Makefile | 3 years ago | |
Makefile.sphinx | 4 years ago | |
README.md | 3 years ago | |
ansible_2_5.inv | 4 years ago | |
ansible_2_6.inv | 4 years ago | |
ansible_2_7.inv | 4 years ago | |
ansible_2_8.inv | 3 years ago | |
ansible_2_9.inv | 4 years ago | |
ansible_2_10.inv | 3 years ago | |
ansible_3.inv | 3 years ago | |
ansible_4.inv | 3 years ago | |
collection-plugins.yml | 4 years ago | |
jinja2.inv | 3 years ago | |
known_good_reqs.txt | 3 years ago | |
modules.js | 8 years ago | |
python2.inv | 5 years ago | |
python3.inv | 3 years ago | |
requirements.txt | 3 years ago | |
variables.dot | 8 years ago |
README.md
Ansible documentation
This project hosts the source behind the general pages of docs.ansible.com. Module-specific documentation is hosted in the various collections repositories. See Ansible Galaxy, the list of Ansible-maintained collections, and the ansible-collections organization for collections sources.
To create clear, concise, and consistent contributions to Ansible documentation, please refer to the following information.
Contributions
Contributions to the documentation are welcome.
The Ansible community produces guidance on contributions, building documentation, and submitting pull requests, which you can find in Contributing to the Ansible Documentation.
You can also join the Docs Working Group and/or the #ansible-docs
IRC channel on irc.libera.chat
Ansible style guide
Ansible documentation is written in ReStructuredText(RST). The Ansible style guide provides linguistic direction and technical guidelines for working with reStructuredText, in addition to other resources.
Tools
The Ansible community uses a range of tools and programs for working with Ansible documentation. Learn more about Other Tools and Programs in the Ansible Community Guide.
GitHub
Ansible documentation is hosted on the Ansible GitHub project and various collection repositories, especially those in the ansible-collections organization. For general GitHub workflows and other information, see the GitHub Guides.