mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-26 13:18:58 +07:00
Moves boolean table to module docs (#2812)
* Add 'True' string Requested to add `True` string to the Truthy values list. (cherry picked from commit 332beea50cf87eb698dc96dd981834c9b5357c5e) * move bool table to module docs (cherry picked from commit d0a7ed89b391e996a07b448c6c671a9c5c75d371) * move bool table to module docs
This commit is contained in:
@@ -45,6 +45,25 @@ For a list of all available modules, see the :ref:`Collection docs <list_of_coll
|
||||
|
||||
ansible-doc -l
|
||||
|
||||
.. _boolean_variables:
|
||||
|
||||
Boolean variables
|
||||
=================
|
||||
|
||||
Ansible accepts a broad range of values for ``bool`` in module arguments: ``true/false``, ``1/0``, ``yes/no``, ``True/False`` and so on. The matching of valid strings is case insensitive.
|
||||
While documentation examples focus on ``true/false`` to be compatible with ``ansible-lint`` default settings, you can use any of the following:
|
||||
|
||||
.. table::
|
||||
:class: documentation-table
|
||||
|
||||
========================================================================================================== ====================================================================
|
||||
Valid values Description
|
||||
========================================================================================================== ====================================================================
|
||||
``True`` , ``'true'`` , ``'t'`` , ``'yes'`` , ``'y'`` , ``'on'`` , ``'1'`` , ``1`` , ``1.0`` Truthy values
|
||||
|
||||
``False`` , ``'false'`` , ``'f'`` , ``'no'`` , ``'n'`` , ``'off'`` , ``'0'`` , ``0`` , ``0.0`` Falsy values
|
||||
|
||||
========================================================================================================== ====================================================================
|
||||
|
||||
.. seealso::
|
||||
|
||||
|
||||
@@ -101,25 +101,6 @@ You will see: ``ERROR! Syntax Error while loading YAML.`` If you add quotes, Ans
|
||||
vars:
|
||||
app_path: "{{ base_path }}/22"
|
||||
|
||||
.. _boolean_variables:
|
||||
|
||||
Boolean variables
|
||||
=================
|
||||
|
||||
Ansible accepts a broad range of values for boolean variables: ``true/false``, ``1/0``, ``yes/no``, ``True/False`` and so on. The matching of valid strings is case insensitive.
|
||||
While documentation examples focus on ``true/false`` to be compatible with ``ansible-lint`` default settings, you can use any of the following:
|
||||
|
||||
.. table::
|
||||
:class: documentation-table
|
||||
|
||||
=============================================================================================== ====================================================================
|
||||
Valid values Description
|
||||
=============================================================================================== ====================================================================
|
||||
``True`` , ``'true'`` , ``'t'`` , ``'yes'`` , ``'y'`` , ``'on'`` , ``'1'`` , ``1`` , ``1.0`` Truthy values
|
||||
|
||||
``False`` , ``'false'`` , ``'f'`` , ``'no'`` , ``'n'`` , ``'off'`` , ``'0'`` , ``0`` , ``0.0`` Falsy values
|
||||
|
||||
=============================================================================================== ====================================================================
|
||||
|
||||
.. _list_variables:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user