From e39d95034080159ec1b4e1406995ec34f92a6b28 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Tue, 22 Dec 2015 15:30:40 -0500 Subject: [PATCH] Update CONTRIBUTING.rst to cover conditionals Performing requested update of CONTRIBUTING.rst to convey boolean casting to contributers. Change-Id: I1e8dc67ce765c4996ff671a7299aa16379c00432 --- CONTRIBUTING.rst | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a7c662201..0364d8b79 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -91,10 +91,20 @@ when contributing code. file: '/path/to/file' get_md5: no -4. Be clear and explicit with actions in playbooks and comments. -5. Simplicity is favored over magic. -6. Documentation should generally be paired with code changes as we feel +4. Playbook conditionals utilizing variables intended as booleans, + should make use of the ``| bool`` casting feature. This is due + to command line overrides are typically interpreted as strings + instead of booleans. Example:: + + - name: "Something something something something" + module: + parameter: "value" + when: boolean_value | bool == true + +5. Be clear and explicit with actions in playbooks and comments. +6. Simplicity is favored over magic. +7. Documentation should generally be paired with code changes as we feel that it is important for us to be able to release the master branch at any time. -7. Documentation should always be limited to 79 characters per row. -8. If you have any questions, please ask in #openstack-ironic. +8. Documentation should always be limited to 79 characters per row. +9. If you have any questions, please ask in #openstack-ironic.