Document boolean default value treatment (#30062)
* Consistency and document treatment of default bool values * Document that default bool values can be any Ansible recognized bool. choose the one that reads better in context * For fragments used by the copy module, make bool types use type=bool and not choices * Edit for clarity
This commit is contained in:
parent
7a12314d54
commit
8a2f069468
3 changed files with 4 additions and 1 deletions
|
@ -223,6 +223,8 @@ The following fields can be used and are all required unless specified otherwise
|
|||
* If `required` is false/missing, `default` may be specified (assumed 'null' if missing).
|
||||
* Ensure that the default parameter in the docs matches the default parameter in the code.
|
||||
* The default option must not be listed as part of the description.
|
||||
* If the option is a boolean value, you can use any of the boolean values recognized by Ansible:
|
||||
(such as true/false or yes/no). Choose the one that reads better in the context of the option.
|
||||
:choices:
|
||||
List of option values. Should be absent if empty.
|
||||
:type:
|
||||
|
|
|
@ -25,7 +25,7 @@ options:
|
|||
description:
|
||||
- This option controls the autodecryption of source files using vault.
|
||||
required: false
|
||||
choices: ['Yes', 'No']
|
||||
type: 'bool'
|
||||
default: 'Yes'
|
||||
version_added: "2.4"
|
||||
"""
|
||||
|
|
|
@ -69,6 +69,7 @@ options:
|
|||
they cannot be updated atomically and can only be done in an unsafe manner.
|
||||
- This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do
|
||||
not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
|
||||
type: bool
|
||||
required: false
|
||||
default: false
|
||||
version_added: "2.2"
|
||||
|
|
Loading…
Reference in a new issue