Module/plugin docs: (#78380)

pull/78448/head
Felix Fontein 2 years ago committed by GitHub
parent d92f6da592
commit 7e634f54c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -332,7 +332,12 @@ stdout:
description: output from apt
returned: success, when needed
type: str
sample: "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following extra packages will be installed:\n apache2-bin ..."
sample: |-
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
apache2-bin ...
stderr:
description: error output from apt
returned: success, when needed

@ -57,7 +57,7 @@ options:
description:
- Assemble files only if C(regex) matches the filename.
- If not set, all files are assembled.
- Every "\" (backslash) must be escaped as "\\" to comply to YAML syntax.
- Every C(\) (backslash) must be escaped as C(\\) to comply to YAML syntax.
- Uses L(Python regular expressions,https://docs.python.org/3/library/re.html).
type: str
ignore_hidden:

@ -35,19 +35,19 @@ options:
least one of the patterns specified. Multiple patterns can be specified using a list.
- The pattern is matched against the file base name, excluding the directory.
- When using regexen, the pattern MUST match the ENTIRE file name, not just parts of it. So
if you are looking to match all files ending in .default, you'd need to use '.*\.default'
as a regexp and not just '\.default'.
if you are looking to match all files ending in .default, you'd need to use C(.*\.default)
as a regexp and not just C(\.default).
- This parameter expects a list, which can be either comma separated or YAML. If any of the
patterns contain a comma, make sure to put them in a list to avoid splitting the patterns
in undesirable ways.
- Defaults to '*' when C(use_regex=False), or '.*' when C(use_regex=True).
- Defaults to C(*) when I(use_regex=False), or C(.*) when I(use_regex=True).
type: list
aliases: [ pattern ]
elements: str
excludes:
description:
- One or more (shell or regex) patterns, which type is controlled by C(use_regex) option.
- Items whose basenames match an C(excludes) pattern are culled from C(patterns) matches.
- One or more (shell or regex) patterns, which type is controlled by I(use_regex) option.
- Items whose basenames match an I(excludes) pattern are culled from I(patterns) matches.
Multiple patterns can be specified using a list.
type: list
aliases: [ exclude ]

@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: getent
short_description: A wrapper to the unix getent utility
@ -36,7 +36,8 @@ options:
version_added: "2.9"
split:
description:
- "Character used to split the database values into lists/arrays such as ':' or '\t', otherwise it will try to pick one depending on the database."
- Character used to split the database values into lists/arrays such as C(:) or C(\t),
otherwise it will try to pick one depending on the database.
type: str
fail_key:
description:

@ -113,7 +113,7 @@ author:
- "Michael DeHaan"
'''
EXAMPLES = """
EXAMPLES = r"""
# Display facts from all hosts and store them indexed by I(hostname) at C(/tmp/facts).
# ansible all -m ansible.builtin.setup --tree /tmp/facts
@ -158,8 +158,8 @@ EXAMPLES = """
# Collect no facts, even the default minimum subset of facts:
# ansible all -m ansible.builtin.setup -a 'gather_subset=!all,!min'
# Display facts from Windows hosts with custom facts stored in C(C:\\custom_facts).
# ansible windows -m ansible.builtin.setup -a "fact_path='c:\\custom_facts'"
# Display facts from Windows hosts with custom facts stored in C:\custom_facts.
# ansible windows -m ansible.builtin.setup -a "fact_path='c:\custom_facts'"
# Gathers facts for the machines in the dbservers group (a.k.a Delegating facts)
- hosts: app_servers

@ -25,7 +25,7 @@ options:
default: no
version_added: '2.4'
notes:
- For Windows you can use M(ansible.windows.win_template) which uses '\\r\\n' as C(newline_sequence) by default.
- For Windows you can use M(ansible.windows.win_template) which uses C(\r\n) as C(newline_sequence) by default.
- The C(jinja2_native) setting has no effect. Native types are never used in the C(template) module which is by design used for generating text files.
For working with templates and utilizing Jinja2 native types see the C(jinja2_native) parameter of the C(template lookup).
seealso:

@ -9,13 +9,13 @@ class ModuleDocFragment(object):
# Windows shell documentation fragment
# FIXME: set_module_language don't belong here but must be set so they don't fail when someone
# get_option('set_module_language') on this plugin
DOCUMENTATION = """
DOCUMENTATION = r"""
options:
async_dir:
description:
- Directory in which ansible will keep async job information.
- Before Ansible 2.8, this was set to C(remote_tmp + "\\.ansible_async").
default: '%USERPROFILE%\\.ansible_async'
- Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async").
default: '%USERPROFILE%\.ansible_async'
ini:
- section: powershell
key: async_dir

@ -4,7 +4,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
DOCUMENTATION = r"""
name: csvfile
author: Jan-Piet Mens (@jpmens) <jpmens(at)gmail.com>
version_added: "1.5"
@ -20,7 +20,7 @@ DOCUMENTATION = """
default:
description: what to return if the value is not found in the file.
delimiter:
description: field separator in the file, for a tab you can specify C(TAB) or C(\\t).
description: field separator in the file, for a tab you can specify C(TAB) or C(\t).
default: TAB
file:
description: name of the CSV/TSV file to open.

Loading…
Cancel
Save