mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 05:49:09 -07:00
* 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 |
||
---|---|---|
.. | ||
cli | ||
compat | ||
config | ||
errors | ||
executor | ||
galaxy | ||
inventory | ||
module_utils | ||
modules | ||
parsing | ||
playbook | ||
plugins | ||
template | ||
utils | ||
vars | ||
__init__.py | ||
constants.py | ||
release.py |