ansible/docs/docsite/rst/user_guide
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
..
shared_snippets Add docs detailing how to convert many with_X style loops to use loop and filters (#40964) 2018-06-01 10:37:21 -04:00
become.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
command_line_tools.rst
index.rst
intro.rst Remove more docs build errors (#45364) 2018-09-11 17:51:47 +01:00
intro_adhoc.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_bsd.rst Remove use of simplejson throughout code base (#43548) 2018-08-10 11:13:29 -05:00
intro_dynamic_inventory.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
intro_getting_started.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_inventory.rst Changed hash_merge to link for ANSIBLE_HASH_BEHAVIOUR (#45996) 2018-09-24 15:03:55 -05:00
intro_patterns.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_windows.rst
module_defaults_config.rst Remove more docs build errors (#45364) 2018-09-11 17:51:47 +01:00
modules.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
modules_intro.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
modules_support.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbook_pathing.rst Remove more docs build errors (#45364) 2018-09-11 17:51:47 +01:00
playbooks.rst Doc build warning/broken link clean-a-palooza (#37382) 2018-03-14 12:44:21 -07:00
playbooks_advanced_syntax.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_async.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_best_practices.rst prefer ansible_facts namespace and dict notation (#44980) 2018-09-06 10:26:58 -05:00
playbooks_blocks.rst prefer ansible_facts namespace and dict notation (#44980) 2018-09-06 10:26:58 -05:00
playbooks_checkmode.rst docs: Document disabling diff on task level (#37998) 2018-04-05 11:08:30 -07:00
playbooks_conditionals.rst prefer ansible_facts namespace and dict notation (#44980) 2018-09-06 10:26:58 -05:00
playbooks_debugger.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_delegation.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_environment.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_error_handling.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_filters.rst adds support for null values to the ternary filter (#45303) 2018-09-24 18:57:19 -04:00
playbooks_filters_ipaddr.rst fixed grammar and spelling issues (#44931) 2018-08-31 08:44:31 -05:00
playbooks_intro.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_lookups.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_loops.rst doc: minor language corrections to loop docs (#42854) 2018-08-22 15:00:25 -04:00
playbooks_module_defaults.rst Docs for module_defaults feature (#39932) 2018-05-25 04:15:44 -04:00
playbooks_prompts.rst Share the implementation of hashing for both vars_prompt and password_hash (#21215) 2018-08-27 08:40:41 -07:00
playbooks_python_version.rst
playbooks_reuse.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_reuse_includes.rst update example to YAML style in documentation (#45968) 2018-09-21 08:42:31 -05:00
playbooks_reuse_roles.rst prefer ansible_facts namespace and dict notation (#44980) 2018-09-06 10:26:58 -05:00
playbooks_roles.rst Reduce warnings (#39254) 2018-04-25 11:18:52 -07:00
playbooks_special_topics.rst Docs for module_defaults feature (#39932) 2018-05-25 04:15:44 -04:00
playbooks_startnstep.rst
playbooks_strategies.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_tags.rst Update tags documentation to explain newer tags behavior (#44274) 2018-08-23 09:46:54 -04:00
playbooks_templating.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_tests.rst prefer ansible_facts namespace and dict notation (#44980) 2018-09-06 10:26:58 -05:00
playbooks_variables.rst prefer ansible_facts namespace and dict notation (#44980) 2018-09-06 10:26:58 -05:00
playbooks_vault.rst Add anchors to some guides and all module categories (#36642) 2018-02-23 17:10:47 -06:00
plugin_filtering_config.rst Fix more docs errors. (#39051) 2018-04-20 00:24:47 -07:00
quickstart.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
vault.rst Fix places in docs that refer to modules without namespace 2018-04-18 08:43:34 -07:00
windows.rst
windows_dsc.rst Fix link and toctree (#45595) 2018-09-13 12:38:49 -05:00
windows_faq.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
windows_setup.rst Fix link and toctree (#45595) 2018-09-13 12:38:49 -05:00
windows_usage.rst Fix link and toctree (#45595) 2018-09-13 12:38:49 -05:00
windows_winrm.rst Add workaround for non-standard kerberos environments (#41465) 2018-09-18 09:33:09 -05:00