1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/docs/docsite/rst
Peter Sprygada 1e68881c40 adds support for null values to the ternary filter (#45303)
* 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
2018-09-24 18:57:19 -04:00
..
community Restore license agreement (#45809) 2018-09-18 14:47:22 -05:00
dev_guide Update developing_modules_general_aci.rst 2018-09-21 23:52:51 +02:00
installation_guide Simplify PPA installation for Ubuntu (#45690) 2018-09-17 08:59:20 -05:00
inventory Update implicit_localhost.rst (#45455) 2018-09-11 15:17:50 -05:00
network Lenovo doc update (#45483) 2018-09-14 15:23:57 -04:00
plugins Infoblox scenario guide (#45664) 2018-09-24 14:25:01 -05:00
porting_guides added note about cli execution of include_x (#45227) 2018-09-21 14:08:57 -05:00
reference_appendices adding git+ssh uri scheme (#36025) 2018-09-17 17:33:56 -05:00
roadmap Update AWS pull request links (#44777) 2018-08-29 09:03:27 -05:00
scenario_guides Infoblox scenario guide (#45664) 2018-09-24 14:25:01 -05:00
user_guide adds support for null values to the ternary filter (#45303) 2018-09-24 18:57:19 -04:00
vmware VMware: Concept documentation (#43927) 2018-08-30 12:49:37 -04:00
conf.py Use updated pygments (#44846) 2018-08-29 11:51:40 -05:00
index.rst Infoblox scenario guide (#45664) 2018-09-24 14:25:01 -05:00