mikhailidim / chronicler-comments

0 stars 0 forks source link

red-hat-ansible-yes-no-and/ #14

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Red Hat Ansible: Yes and No, True and False

https://chronicler.tech/red-hat-ansible-yes-no-and/

bbaassssiiee commented 2 years ago

This blog post is based on personal preference only. true and false are valid Boolean types in YAML and in JSON. The Ansible documentation stated that (while other forms are valid) "Use lowercase ‘true’ or ‘false’ for boolean values in dictionaries if you want to be compatible with default yamllint options." Yamllint is triggered by ansible-lint and molecule.

mikhailidim commented 2 years ago

Could not agree more. For me, it's about a common style and code reuse.

On Thu, Oct 7, 2021 at 8:17 AM Bas Meijer @.***> wrote:

This blog post is based on personal preference only. true and false are valid Boolean types in YAML and in JSON. The Ansible documentation stated that (while other forms are valid) "Use lowercase ‘true’ or ‘false’ for boolean values in dictionaries if you want to be compatible with default yamllint options." Yamllint is triggered by ansible-lint and molecule.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikhailidim/chronicler-comments/issues/14#issuecomment-937736481, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNMKYB7Y5NQ57G67WH76EDUFWFVLANCNFSM5FRETWZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

spagu commented 2 years ago

https://yaml.org/type/bool.html
``+Regexp: y|Y|yes|Yes|YES|n|N|no|No|NO |true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF```

bbaassssiiee commented 2 years ago

Once you start using returned Booleans in Ansible, then you'll see they're JSON.