Move validate command into doc fragment and fix a few typos

pull/18777/head
Jeff Widman 10 years ago committed by Matt Clay
parent e7af5d2384
commit 70b3290a3b

@ -63,21 +63,13 @@ options:
force: force:
description: description:
- the default is C(yes), which will replace the remote file when contents - the default is C(yes), which will replace the remote file when contents
are different than the source. If C(no), the file will only be transferred are different than the source. If C(no), the file will only be transferred
if the destination does not exist. if the destination does not exist.
version_added: "1.1" version_added: "1.1"
required: false required: false
choices: [ "yes", "no" ] choices: [ "yes", "no" ]
default: "yes" default: "yes"
aliases: [ "thirsty" ] aliases: [ "thirsty" ]
validate:
description:
- The validation command to run before copying into place. The path to the file to
validate is passed in via '%s' which must be present as in the visudo example below.
The command is passed securely so shell features like expansion and pipes won't work.
required: false
default: ""
version_added: "1.2"
directory_mode: directory_mode:
description: description:
- When doing a recursive copy set the mode for the directories. If this is not set we will use the system - When doing a recursive copy set the mode for the directories. If this is not set we will use the system
@ -86,6 +78,7 @@ options:
required: false required: false
version_added: "1.5" version_added: "1.5"
extends_documentation_fragment: files extends_documentation_fragment: files
extends_documentation_fragment: validate
author: author:
- "Ansible Core Team" - "Ansible Core Team"
- "Michael DeHaan" - "Michael DeHaan"

@ -31,6 +31,7 @@ author:
- "Daniel Hokka Zakrissoni (@dhozac)" - "Daniel Hokka Zakrissoni (@dhozac)"
- "Ahti Kitsik (@ahtik)" - "Ahti Kitsik (@ahtik)"
extends_documentation_fragment: files extends_documentation_fragment: files
extends_documentation_fragment: validate
short_description: Ensure a particular line is in a file, or replace an short_description: Ensure a particular line is in a file, or replace an
existing line using a back-referenced regular expression. existing line using a back-referenced regular expression.
description: description:
@ -116,16 +117,6 @@ options:
description: description:
- Create a backup file including the timestamp information so you can - Create a backup file including the timestamp information so you can
get the original file back if you somehow clobbered it incorrectly. get the original file back if you somehow clobbered it incorrectly.
validate:
required: false
description:
- validation to run before copying into place.
Use %s in the command to indicate the current file to validate.
The command is passed securely so shell features like
expansion and pipes won't work.
required: false
default: None
version_added: "1.4"
others: others:
description: description:
- All arguments accepted by the M(file) module also work here. - All arguments accepted by the M(file) module also work here.

@ -27,6 +27,7 @@ DOCUMENTATION = """
module: replace module: replace
author: "Evan Kaufman (@EvanK)" author: "Evan Kaufman (@EvanK)"
extends_documentation_fragment: files extends_documentation_fragment: files
extends_documentation_fragment: validate
short_description: Replace all instances of a particular string in a short_description: Replace all instances of a particular string in a
file using a back-referenced regular expression. file using a back-referenced regular expression.
description: description:
@ -61,12 +62,6 @@ options:
description: description:
- Create a backup file including the timestamp information so you can - Create a backup file including the timestamp information so you can
get the original file back if you somehow clobbered it incorrectly. get the original file back if you somehow clobbered it incorrectly.
validate:
required: false
description:
- validation to run before copying into place
required: false
default: None
others: others:
description: description:
- All arguments accepted by the M(file) module also work here. - All arguments accepted by the M(file) module also work here.

@ -38,15 +38,6 @@ options:
required: false required: false
choices: [ "yes", "no" ] choices: [ "yes", "no" ]
default: "no" default: "no"
validate:
description:
- The validation command to run before copying into place.
- The path to the file to validate is passed in via '%s' which must be present as in the visudo example below.
- validation to run before copying into place. The command is passed
securely so shell features like expansion and pipes won't work.
required: false
default: ""
version_added: "1.2"
force: force:
description: description:
- the default is C(yes), which will replace the remote file when contents - the default is C(yes), which will replace the remote file when contents
@ -62,6 +53,7 @@ author:
- Ansible Core Team - Ansible Core Team
- Michael DeHaan - Michael DeHaan
extends_documentation_fragment: files extends_documentation_fragment: files
extends_documentation_fragment: validate
''' '''
EXAMPLES = ''' EXAMPLES = '''

Loading…
Cancel
Save