mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Avoid having module documentation links to itself (#21329)
* Avoid having module documentation links to itself A lot of modules use M(own_module) in their documentation causing a link in the documentation to itself. * Make note more clear now
This commit is contained in:
committed by
John R Barker
parent
fb32c19fea
commit
f824b2ce8d
@@ -29,7 +29,7 @@ module: command
|
||||
short_description: Executes a command on a remote node
|
||||
version_added: historical
|
||||
description:
|
||||
- The M(command) module takes the command name followed by a list of space-delimited arguments.
|
||||
- The C(command) module takes the command name followed by a list of space-delimited arguments.
|
||||
- The given command will be executed on all selected nodes. It will not be
|
||||
processed through the shell, so variables like C($HOME) and operations
|
||||
like C("<"), C(">"), C("|"), C(";") and C("&") will not work (use the M(shell)
|
||||
@@ -72,7 +72,7 @@ options:
|
||||
required: false
|
||||
notes:
|
||||
- If you want to run a command through the shell (say you are using C(<), C(>), C(|), etc), you actually want the M(shell) module instead.
|
||||
The M(command) module is much more secure as it's not affected by the user's environment.
|
||||
The C(command) module is much more secure as it's not affected by the user's environment.
|
||||
- " C(creates), C(removes), and C(chdir) can be specified after the command.
|
||||
For instance, if you only want to run a command if a certain file does not exist, use this."
|
||||
author:
|
||||
|
||||
@@ -28,7 +28,7 @@ module: expect
|
||||
version_added: 2.0
|
||||
short_description: Executes a command and responds to prompts
|
||||
description:
|
||||
- The M(expect) module executes a command and responds to prompts
|
||||
- The C(expect) module executes a command and responds to prompts
|
||||
- The given command will be executed on all selected nodes. It will not be
|
||||
processed through the shell, so variables like C($HOME) and operations
|
||||
like C("<"), C(">"), C("|"), and C("&") will not work
|
||||
|
||||
@@ -44,7 +44,7 @@ description:
|
||||
all core modules require it. Another is speaking to any devices such as
|
||||
routers that do not have any Python installed. In any other case, using
|
||||
the M(shell) or M(command) module is much more appropriate. Arguments
|
||||
given to M(raw) are run directly through the configured remote shell.
|
||||
given to C(raw) are run directly through the configured remote shell.
|
||||
Standard output, error output and return code are returned when
|
||||
available. There is no change handler support for this module.
|
||||
- This module does not require python on the remote system, much like
|
||||
|
||||
@@ -23,7 +23,7 @@ module: script
|
||||
version_added: "0.9"
|
||||
short_description: Runs a local script on a remote node after transferring it
|
||||
description:
|
||||
- "The M(script) module takes the script name followed by a list of
|
||||
- "The C(script) module takes the script name followed by a list of
|
||||
space-delimited arguments. "
|
||||
- "The local script at path will be transferred to the remote node and then executed. "
|
||||
- "The given script will be processed through the shell environment on the remote node. "
|
||||
|
||||
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
|
||||
module: shell
|
||||
short_description: Execute commands in nodes.
|
||||
description:
|
||||
- The M(shell) module takes the command name followed by a list of space-delimited arguments.
|
||||
- The C(shell) module takes the command name followed by a list of space-delimited arguments.
|
||||
It is almost exactly like the M(command) module but runs
|
||||
the command through a shell (C(/bin/sh)) on the remote node.
|
||||
version_added: "0.2"
|
||||
@@ -69,8 +69,8 @@ options:
|
||||
notes:
|
||||
- If you want to execute a command securely and predictably, it may be
|
||||
better to use the M(command) module instead. Best practices when writing
|
||||
playbooks will follow the trend of using M(command) unless M(shell) is
|
||||
explicitly required. When running ad-hoc commands, use your best
|
||||
playbooks will follow the trend of using M(command) unless the C(shell)
|
||||
module is explicitly required. When running ad-hoc commands, use your best
|
||||
judgement.
|
||||
- To sanitize any variables passed to the shell module, you should use
|
||||
"{{ var | quote }}" instead of just "{{ var }}" to make sure they don't include evil things like semicolons.
|
||||
|
||||
Reference in New Issue
Block a user