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.
* adds support for null values to the ternary filter
This change adds a third optional argument to the ternary filter to
handle a null value. If the third option is specified null and false
are treated differently.
For instance, take the following example:
{{ enabled | ternary('no shutdown', 'shutdown') }}
If enabled == True, then 'no shutdown' is used.
If enabled in (False, None), then 'shutdown' is used.
With this change the following is possible:
{{ enabled | ternary('no shutdown', 'shutdown', omit) }}
If enabled == True, then 'no shutdown'
If enabled == False, then 'shutdown'
If enabled == None, then omit
* update documentation with example of filter
* update filter documentation example per comments
* fix logic error in user_guide example
|
7 years ago | |
|---|---|---|
| .. | ||
| shared_snippets | ||
| become.rst | 7 years ago | |
| command_line_tools.rst | ||
| index.rst | ||
| intro.rst | 7 years ago | |
| intro_adhoc.rst | 8 years ago | |
| intro_bsd.rst | 7 years ago | |
| intro_dynamic_inventory.rst | 7 years ago | |
| intro_getting_started.rst | 8 years ago | |
| intro_inventory.rst | 7 years ago | |
| intro_patterns.rst | 8 years ago | |
| intro_windows.rst | ||
| module_defaults_config.rst | 7 years ago | |
| modules.rst | 8 years ago | |
| modules_intro.rst | 8 years ago | |
| modules_support.rst | 8 years ago | |
| playbook_pathing.rst | 7 years ago | |
| playbooks.rst | ||
| playbooks_advanced_syntax.rst | 8 years ago | |
| playbooks_async.rst | 8 years ago | |
| playbooks_best_practices.rst | 7 years ago | |
| playbooks_blocks.rst | 7 years ago | |
| playbooks_checkmode.rst | ||
| playbooks_conditionals.rst | 7 years ago | |
| playbooks_debugger.rst | 8 years ago | |
| playbooks_delegation.rst | 8 years ago | |
| playbooks_environment.rst | 8 years ago | |
| playbooks_error_handling.rst | 8 years ago | |
| playbooks_filters.rst | 7 years ago | |
| playbooks_filters_ipaddr.rst | 7 years ago | |
| playbooks_intro.rst | 8 years ago | |
| playbooks_lookups.rst | 8 years ago | |
| playbooks_loops.rst | 7 years ago | |
| playbooks_module_defaults.rst | ||
| playbooks_prompts.rst | 7 years ago | |
| playbooks_python_version.rst | ||
| playbooks_reuse.rst | 8 years ago | |
| playbooks_reuse_includes.rst | 7 years ago | |
| playbooks_reuse_roles.rst | 7 years ago | |
| playbooks_roles.rst | ||
| playbooks_special_topics.rst | ||
| playbooks_startnstep.rst | ||
| playbooks_strategies.rst | 8 years ago | |
| playbooks_tags.rst | 7 years ago | |
| playbooks_templating.rst | 8 years ago | |
| playbooks_tests.rst | 7 years ago | |
| playbooks_variables.rst | 7 years ago | |
| playbooks_vault.rst | ||
| plugin_filtering_config.rst | ||
| quickstart.rst | 7 years ago | |
| vault.rst | ||
| windows.rst | ||
| windows_dsc.rst | 7 years ago | |
| windows_faq.rst | 8 years ago | |
| windows_setup.rst | 7 years ago | |
| windows_usage.rst | 7 years ago | |
| windows_winrm.rst | 7 years ago | |