Skip to content

Commit cad6ff6

Browse files
authored
Moves boolean table to module docs (#2812)
* Add 'True' string Requested to add `True` string to the Truthy values list. (cherry picked from commit 332beea) * move bool table to module docs (cherry picked from commit d0a7ed8) * move bool table to module docs
1 parent c12d162 commit cad6ff6

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

docs/docsite/rst/module_plugin_guide/modules_intro.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,25 @@ For a list of all available modules, see the :ref:`Collection docs <list_of_coll
4545
4646
ansible-doc -l
4747
48+
.. _boolean_variables:
49+
50+
Boolean variables
51+
=================
52+
53+
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.
54+
While documentation examples focus on ``true/false`` to be compatible with ``ansible-lint`` default settings, you can use any of the following:
55+
56+
.. table::
57+
:class: documentation-table
58+
59+
========================================================================================================== ====================================================================
60+
Valid values Description
61+
========================================================================================================== ====================================================================
62+
``True`` , ``'true'`` , ``'t'`` , ``'yes'`` , ``'y'`` , ``'on'`` , ``'1'`` , ``1`` , ``1.0`` Truthy values
63+
64+
``False`` , ``'false'`` , ``'f'`` , ``'no'`` , ``'n'`` , ``'off'`` , ``'0'`` , ``0`` , ``0.0`` Falsy values
65+
66+
========================================================================================================== ====================================================================
4867

4968
.. seealso::
5069

docs/docsite/rst/playbook_guide/playbooks_variables.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,6 @@ You will see: ``ERROR! Syntax Error while loading YAML.`` If you add quotes, Ans
101101
vars:
102102
app_path: "{{ base_path }}/22"
103103

104-
.. _boolean_variables:
105-
106-
Boolean variables
107-
=================
108-
109-
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.
110-
While documentation examples focus on ``true/false`` to be compatible with ``ansible-lint`` default settings, you can use any of the following:
111-
112-
.. table::
113-
:class: documentation-table
114-
115-
=============================================================================================== ====================================================================
116-
Valid values Description
117-
=============================================================================================== ====================================================================
118-
``True`` , ``'true'`` , ``'t'`` , ``'yes'`` , ``'y'`` , ``'on'`` , ``'1'`` , ``1`` , ``1.0`` Truthy values
119-
120-
``False`` , ``'false'`` , ``'f'`` , ``'no'`` , ``'n'`` , ``'off'`` , ``'0'`` , ``0`` , ``0.0`` Falsy values
121-
122-
=============================================================================================== ====================================================================
123104

124105
.. _list_variables:
125106

0 commit comments

Comments
 (0)