Document lookups using dwim (#80878)

pull/80993/head
Sloane Hertel 2 years ago committed by GitHub
parent c511a79172
commit 1ecc62ba06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,6 +35,9 @@ DOCUMENTATION = r"""
- For historical reasons, in the search keyname, quotes are treated - For historical reasons, in the search keyname, quotes are treated
literally and cannot be used around the string unless they appear literally and cannot be used around the string unless they appear
(escaped as required) in the first column of the file you are parsing. (escaped as required) in the first column of the file you are parsing.
seealso:
- ref: playbook_task_paths
description: Search paths used for relative files.
""" """
EXAMPLES = """ EXAMPLES = """

@ -28,6 +28,9 @@ DOCUMENTATION = """
notes: notes:
- if read in variable context, the file can be interpreted as YAML if the content is valid to the parser. - if read in variable context, the file can be interpreted as YAML if the content is valid to the parser.
- this lookup does not understand 'globbing', use the fileglob lookup instead. - this lookup does not understand 'globbing', use the fileglob lookup instead.
seealso:
- ref: playbook_task_paths
description: Search paths used for relative files.
""" """
EXAMPLES = """ EXAMPLES = """

@ -22,6 +22,9 @@ DOCUMENTATION = """
- Matching is against local system files on the Ansible controller. - Matching is against local system files on the Ansible controller.
To iterate a list of files on a remote node, use the M(ansible.builtin.find) module. To iterate a list of files on a remote node, use the M(ansible.builtin.find) module.
- Returns a string list of paths joined by commas, or an empty list if no files match. For a 'true list' pass C(wantlist=True) to the lookup. - Returns a string list of paths joined by commas, or an empty list if no files match. For a 'true list' pass C(wantlist=True) to the lookup.
seealso:
- ref: playbook_task_paths
description: Search paths used for relative files.
""" """
EXAMPLES = """ EXAMPLES = """

@ -45,6 +45,9 @@ DOCUMENTATION = """
- When C(True) and C(lookup) or C(query) specifies I(errors='ignore'), no file found will return an empty - When C(True) and C(lookup) or C(query) specifies I(errors='ignore'), no file found will return an empty
list and other potential errors return an empty string or empty list depending on the template call list and other potential errors return an empty string or empty list depending on the template call
(in other words return values of C(lookup) v C(query)). (in other words return values of C(lookup) v C(query)).
seealso:
- ref: playbook_task_paths
description: Search paths used for relative paths/files.
""" """
EXAMPLES = """ EXAMPLES = """

@ -50,6 +50,9 @@ DOCUMENTATION = """
default: False default: False
aliases: ['allow_none'] aliases: ['allow_none']
version_added: '2.12' version_added: '2.12'
seealso:
- ref: playbook_task_paths
description: Search paths used for relative files.
""" """
EXAMPLES = """ EXAMPLES = """

@ -20,6 +20,7 @@ DOCUMENTATION = """
- Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'.
If you need to use different permissions, you must change the command or run Ansible as another user. If you need to use different permissions, you must change the command or run Ansible as another user.
- Alternatively, you can use a shell/command task that runs against localhost and registers the result. - Alternatively, you can use a shell/command task that runs against localhost and registers the result.
- The directory of the play is used as the current working directory.
""" """
EXAMPLES = """ EXAMPLES = """

@ -24,6 +24,7 @@ DOCUMENTATION = r"""
It is strongly recommended to pass user input or variable input via quote filter before using with pipe lookup. It is strongly recommended to pass user input or variable input via quote filter before using with pipe lookup.
See example section for this. See example section for this.
Read more about this L(Bandit B602 docs,https://bandit.readthedocs.io/en/latest/plugins/b602_subprocess_popen_with_shell_equals_true.html) Read more about this L(Bandit B602 docs,https://bandit.readthedocs.io/en/latest/plugins/b602_subprocess_popen_with_shell_equals_true.html)
- The directory of the play is used as the current working directory.
""" """
EXAMPLES = r""" EXAMPLES = r"""

@ -54,6 +54,9 @@ DOCUMENTATION = """
description: The string marking the end of a comment statement. description: The string marking the end of a comment statement.
version_added: '2.12' version_added: '2.12'
type: str type: str
seealso:
- ref: playbook_task_paths
description: Search paths used for relative templates.
""" """
EXAMPLES = """ EXAMPLES = """

@ -16,6 +16,9 @@ DOCUMENTATION = """
required: True required: True
notes: notes:
- This lookup does not understand 'globbing' nor shell environment variables. - This lookup does not understand 'globbing' nor shell environment variables.
seealso:
- ref: playbook_task_paths
description: Search paths used for relative files.
""" """
EXAMPLES = """ EXAMPLES = """

Loading…
Cancel
Save