Update 'patch' documentation for src, remote_src, backup and binary.

The patch module has a few missing items, and inconsistencies, in its
documentation. A few of which are addressed here.

Within Ansible documentation, the choices for boolean values are
commonly 'yes', and 'no'. We standardise the options on that.

'remote_src' documentation uses 'False' and 'True' for its documentation,
so these have been updated in both the choices and default.

'src' documentation refers to 'remote_src', so is updated to use
the 'no' choice.

'backup' did not describe its options and default at all, so we add
them.

'binary' default used 'False', but specified the type as 'bool' which is
implicitly documented as 'yes'/'no', so we make that 'no' as well.
reviewable/pr18780/r1
Charles Ferguson 9 years ago
parent 767ec29640
commit 68b7142d62

@ -46,17 +46,17 @@ options:
src: src:
description: description:
- Path of the patch file as accepted by the GNU patch tool. If - Path of the patch file as accepted by the GNU patch tool. If
C(remote_src) is False, the patch source file is looked up from the C(remote_src) is 'no', the patch source file is looked up from the
module's "files" directory. module's "files" directory.
required: true required: true
aliases: [ "patchfile" ] aliases: [ "patchfile" ]
remote_src: remote_src:
description: description:
- If False, it will search for src at originating/master machine, if True it will - If C(no), it will search for src at originating/master machine, if C(yes) it will
go to the remote/target machine for the src. Default is False. go to the remote/target machine for the src. Default is C(no).
choices: [ "True", "False" ] choices: [ "yes", "no" ]
required: false required: false
default: "False" default: "no"
strip: strip:
description: description:
- Number that indicates the smallest prefix containing leading slashes - Number that indicates the smallest prefix containing leading slashes
@ -70,15 +70,17 @@ options:
description: description:
- passes --backup --version-control=numbered to patch, - passes --backup --version-control=numbered to patch,
producing numbered backup copies producing numbered backup copies
choices: [ 'yes', 'no' ]
default: 'no'
binary: binary:
version_added: "2.0" version_added: "2.0"
description: description:
- Setting to true will disable patch's heuristic for transforming CRLF - Setting to C(yes) will disable patch's heuristic for transforming CRLF
line endings into LF. Line endings of src and dest must match. If set to line endings into LF. Line endings of src and dest must match. If set to
False, patch will replace CRLF in src files on POSIX. C(no), patch will replace CRLF in src files on POSIX.
required: false required: false
type: "bool" type: "bool"
default: "False" default: "no"
note: note:
- This module requires GNU I(patch) utility to be installed on the remote host. - This module requires GNU I(patch) utility to be installed on the remote host.
''' '''

Loading…
Cancel
Save