mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* 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>
|
4 years ago | |
|---|---|---|
| .. | ||
| shared_snippets | 5 years ago | |
| basic_concepts.rst | 6 years ago | |
| become.rst | 4 years ago | |
| collections_using.rst | 4 years ago | |
| command_line_tools.rst | 6 years ago | |
| complex_data_manipulation.rst | 4 years ago | |
| connection_details.rst | 5 years ago | |
| guide_rolling_upgrade.rst | 4 years ago | |
| index.rst | 5 years ago | |
| intro.rst | 5 years ago | |
| intro_adhoc.rst | 4 years ago | |
| intro_bsd.rst | 4 years ago | |
| intro_dynamic_inventory.rst | 4 years ago | |
| intro_getting_started.rst | 4 years ago | |
| intro_inventory.rst | 4 years ago | |
| intro_patterns.rst | 4 years ago | |
| intro_windows.rst | 7 years ago | |
| modules.rst | 4 years ago | |
| modules_intro.rst | 4 years ago | |
| modules_support.rst | 4 years ago | |
| playbook_pathing.rst | 4 years ago | |
| playbooks.rst | 5 years ago | |
| playbooks_advanced_syntax.rst | 4 years ago | |
| playbooks_async.rst | 4 years ago | |
| playbooks_best_practices.rst | 5 years ago | |
| playbooks_blocks.rst | 4 years ago | |
| playbooks_checkmode.rst | 5 years ago | |
| playbooks_conditionals.rst | 4 years ago | |
| playbooks_debugger.rst | 4 years ago | |
| playbooks_delegation.rst | 4 years ago | |
| playbooks_environment.rst | 4 years ago | |
| playbooks_error_handling.rst | 4 years ago | |
| playbooks_filters.rst | 4 years ago | |
| playbooks_filters_ipaddr.rst | 4 years ago | |
| playbooks_handlers.rst | 5 years ago | |
| playbooks_intro.rst | 5 years ago | |
| playbooks_lookups.rst | 4 years ago | |
| playbooks_loops.rst | 4 years ago | |
| playbooks_module_defaults.rst | 4 years ago | |
| playbooks_prompts.rst | 4 years ago | |
| playbooks_python_version.rst | 5 years ago | |
| playbooks_reuse.rst | 4 years ago | |
| playbooks_reuse_includes.rst | 5 years ago | |
| playbooks_reuse_roles.rst | 4 years ago | |
| playbooks_roles.rst | 7 years ago | |
| playbooks_special_topics.rst | 5 years ago | |
| playbooks_startnstep.rst | 6 years ago | |
| playbooks_strategies.rst | 4 years ago | |
| playbooks_tags.rst | 4 years ago | |
| playbooks_templating.rst | 4 years ago | |
| playbooks_tests.rst | 4 years ago | |
| playbooks_variables.rst | 4 years ago | |
| playbooks_vars_facts.rst | 5 years ago | |
| playbooks_vault.rst | 5 years ago | |
| plugin_filtering_config.rst | 5 years ago | |
| quickstart.rst | 6 years ago | |
| sample_setup.rst | 4 years ago | |
| vault.rst | 5 years ago | |
| windows.rst | 6 years ago | |
| windows_dsc.rst | 4 years ago | |
| windows_faq.rst | 4 years ago | |
| windows_performance.rst | 4 years ago | |
| windows_setup.rst | 4 years ago | |
| windows_usage.rst | 4 years ago | |
| windows_winrm.rst | 4 years ago | |