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.
ansible/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
7 years ago
..
community Restore license agreement (#45809) 7 years ago
dev_guide Update developing_modules_general_aci.rst 7 years ago
installation_guide Simplify PPA installation for Ubuntu (#45690) 7 years ago
inventory Update implicit_localhost.rst (#45455) 7 years ago
network Lenovo doc update (#45483) 7 years ago
plugins Infoblox scenario guide (#45664) 7 years ago
porting_guides added note about cli execution of include_x (#45227) 7 years ago
reference_appendices adding git+ssh uri scheme (#36025) 7 years ago
roadmap Update AWS pull request links (#44777) 7 years ago
scenario_guides Infoblox scenario guide (#45664) 7 years ago
user_guide adds support for null values to the ternary filter (#45303) 7 years ago
vmware VMware: Concept documentation (#43927) 7 years ago
conf.py Use updated pygments (#44846) 7 years ago
index.rst Infoblox scenario guide (#45664) 7 years ago