You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the distinction between native boolean values and those interpretable as boolean could be clearer. This lack of distinction might lead users to misunderstand how Ansible processes certain values.
When I look at that table, it's obvious to me that I can run the play, and the "check" task within the play won't execute.
(ansible-core)
# Note that while other values may be cast to boolean values, these are the only ones that are natively considered boolean
# Note also that `yes` is the only case-sensitive variant of these values.
- item is boolean
But looks like better to clarify that in Boolean variables section.
To address this, I propose splitting the section into two subsections:
Native Boolean: This subsection would outline values natively recognized as boolean by Ansible, such as yes, true, false, etc.
Interpretable as Bool: Here, we could elaborate on values that may not be natively recognized but can be interpreted as boolean ('false', 'f' etc...), emphasizing the usage of the bool filter for proper conversion.
Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.
Hi @skilyazhnev Thanks for opening this issue! I've used your example and can observe the behaviour you mention. It's interesting and the proposal to split the section seems reasonable to me. There's always room for more nuance in the docs, I find. However I'm also mindful that folks from the core team or some of the super knowledgeable community folks could see things differently and have other recommendations.
The best way to find out is usually a PR. Do you want to make the changes you're suggesting and submit a PR to this repo?
Hello!
The table presents boolean values and their interpretations within Ansible.
ansible-documentation/docs/docsite/rst/playbook_guide/playbooks_variables.rst
Lines 106 to 116 in adb97e4
However, the distinction between native boolean values and those interpretable as boolean could be clearer. This lack of distinction might lead users to misunderstand how Ansible processes certain values.
When I look at that table, it's obvious to me that I can run the play, and the "check" task within the play won't execute.
(ansible-core)
But it will execute because it will be interpreted as True (not an empty string). And I have to use
| bool
to force work it right.There is some note about "Native" bool values and intetpritation in test article
ansible-documentation/docs/docsite/rst/playbook_guide/playbooks_tests.rst
Lines 505 to 521 in adb97e4
But looks like better to clarify that in Boolean variables section.
To address this, I propose splitting the section into two subsections:
Native Boolean: This subsection would outline values natively recognized as boolean by Ansible, such as
yes
,true
,false
, etc.Interpretable as Bool: Here, we could elaborate on values that may not be natively recognized but can be interpreted as boolean (
'false'
,'f'
etc...), emphasizing the usage of the bool filter for proper conversion.How do you think?
Tested on
The text was updated successfully, but these errors were encountered: