community.general/lib/ansible
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
..
cli avoid empty groups in json output (#45621) 2018-09-13 15:38:52 -04:00
compat Fix the local and ssh plugins for a cornercase retrying a syscall 2018-08-13 07:17:11 -07:00
config Fix issues with PLUGIN_FILTERS_CFG config handling (#45994) 2018-09-24 14:34:59 -05:00
errors give hint to users when a file is not found 2018-04-10 17:19:03 -04:00
executor Move persistent connections to only use registered variables (#45616) 2018-09-20 09:56:43 -04:00
galaxy Link to the Galaxy platforms list from the meta file template (#34046) 2018-09-17 13:39:54 -05:00
inventory add docstring for ansible.inventory.helpers.get_group_vars 2018-09-14 16:02:45 -04:00
module_utils Add an Online servers fact 2018-09-24 21:03:50 +02:00
modules Update typetalk.py to use com domain (#46045) 2018-09-24 16:42:06 -05:00
parsing Support nested JSON decoding in AnsibleJSONDecoder (#45924) 2018-09-24 14:33:19 -05:00
playbook 2.8 Core Deprecation Removal (#45232) 2018-09-10 15:05:52 -05:00
plugins adds support for null values to the ternary filter (#45303) 2018-09-24 18:57:19 -04:00
template remove unused templar._clean_data() (#42739) 2018-09-11 09:11:03 +02:00
utils fix doc links (#46094) 2018-09-24 16:08:05 -05:00
vars 2.8 Core Deprecation Removal (#45232) 2018-09-10 15:05:52 -05:00
__init__.py
constants.py cisco firepower : Make API endpoints configurable via hostvars (#44952) 2018-08-31 18:38:16 +05:30
release.py Codename: How Many More Times 2018-09-04 12:38:29 -04:00