Ansible: Difference between revisions
No edit summary |
|||
| Line 140: | Line 140: | ||
Truthy values should always be expressed as '''one of <code>[false, true]</code>'''. Although the Ansible docs show that [https://docs.ansible.com/ansible/latest/YAMLSyntax.html#yaml-basics you can use several forms of expression for boolean values], and [http://yaml.org/type/bool.html the YAML spec specifies a fuller range of possibilities] described below, the Ansible documentation now also [https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html clarifies that only lowercase 'true' or 'false'] is compatible with [[yamllint]] options. | Truthy values should always be expressed as '''one of <code>[false, true]</code>'''. Although the Ansible docs show that [https://docs.ansible.com/ansible/latest/YAMLSyntax.html#yaml-basics you can use several forms of expression for boolean values], and [http://yaml.org/type/bool.html the YAML spec specifies a fuller range of possibilities] described below, the Ansible documentation now also [https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html clarifies that only lowercase 'true' or 'false'] is compatible with [[yamllint]] options. | ||
<syntaxhighlight lang=ebnf> | ;YAML boolean values, not Ansible: | ||
:<syntaxhighlight lang=ebnf> | |||
y|Y|yes|Yes|YES|n|N|no|No|NO | y|Y|yes|Yes|YES|n|N|no|No|NO | ||
|true|True|TRUE|false|False|FALSE | |true|True|TRUE|false|False|FALSE | ||