Fix additional spelling errors in builtin modules (#82012)

pull/82030/head
Adam Ross 7 months ago committed by GitHub
parent 0b7387d46c
commit b815b15362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -355,7 +355,7 @@ Function Invoke-WithWebRequest {
.PARAMETER Module
The Ansible.Basic module to set the return values for. This will set the following return values;
elapsed - The total time, in seconds, that it took to send the web request and process the response
msg - The human readable description of the response status code
msg - The human-readable description of the response status code
status_code - An int that is the response status code
.PARAMETER Request

@ -95,7 +95,7 @@ options:
- If V(true) it will search for O(src) on the managed (remote) node.
- O(remote_src) supports recursive copying as of version 2.8.
- O(remote_src) only works with O(mode=preserve) as of version 2.6.
- Autodecryption of files does not work when O(remote_src=yes).
- Auto-decryption of files does not work when O(remote_src=yes).
type: bool
default: no
version_added: '2.0'

@ -109,7 +109,7 @@ ansible_facts:
description:
- A list of results or a single result as a list of the fields the db provides
- The list elements depend on the database queried, see getent man page for the structure
- Starting at 2.11 it now returns multiple duplicate entries, previouslly it only returned the last one
- Starting at 2.11 it now returns multiple duplicate entries, previously it only returned the last one
returned: always
type: list
'''

@ -66,7 +66,7 @@ options:
type: str
description:
description:
- A human readable string describing the repository. This option corresponds to the "name" property in the repo file.
- A human-readable string describing the repository. This option corresponds to the "name" property in the repo file.
- This parameter is only required if O(state) is set to V(present).
type: str
enabled:

@ -34,7 +34,7 @@ class Handler(Task):
super(Handler, self).__init__(block=block, role=role, task_include=task_include)
def __repr__(self):
''' returns a human readable representation of the handler '''
''' returns a human-readable representation of the handler '''
return "HANDLER: %s" % self.get_name()
@staticmethod

@ -134,7 +134,7 @@ class Task(Base, Conditional, Taggable, CollectionSearch, Notifiable, Delegatabl
return t.load_data(data, variable_manager=variable_manager, loader=loader)
def __repr__(self):
''' returns a human readable representation of the task '''
''' returns a human-readable representation of the task '''
if self.action in C._ACTION_META:
return "TASK: meta (%s)" % self.args['_raw_params']
else:

@ -122,7 +122,7 @@ class ActionModule(ActionBase):
mod_args = self._get_module_args(fact_module, task_vars)
# if module does not handle timeout, use timeout to handle module, hijack async_val as this is what async_wrapper uses
# TODO: make this action compain about async/async settings, use parallel option instead .. or remove parallel in favor of async settings?
# TODO: make this action complain about async/async settings, use parallel option instead .. or remove parallel in favor of async settings?
if timeout and 'gather_timeout' not in mod_args:
self._task.async_val = int(timeout)
elif async_val != 0:

@ -165,7 +165,7 @@ class CallbackModule(CallbackBase):
# args can be specified as no_log in several places: in the task or in
# the argument spec. We can check whether the task is no_log but the
# argument spec can't be because that is only run on the target
# machine and we haven't run it thereyet at this time.
# machine and we haven't run it there yet at this time.
#
# So we give people a config option to affect display of the args so
# that they can secure this if they feel that their stdout is insecure

@ -89,7 +89,7 @@ class Connection(ConnectionBase):
master = None
stdin = subprocess.PIPE
if sudoable and self.become and self.become.expect_prompt() and not self.get_option('pipelining'):
# Create a pty if sudoable for privlege escalation that needs it.
# Create a pty if sudoable for privilege escalation that needs it.
# Falls back to using a standard pipe if this fails, which may
# cause the command to fail in certain situations where we are escalating
# privileges or the command otherwise needs a pty.

@ -4,7 +4,7 @@
from __future__ import annotations
# WARNING: this is mostly here as a convinence for documenting core behaviours, no plugin outside of ansible-core should use this file
# WARNING: this is mostly here as a convenience for documenting core behaviours, no plugin outside of ansible-core should use this file
class ModuleDocFragment(object):
# requires action_common

@ -12,7 +12,7 @@ class ModuleDocFragment(object):
options:
decrypt:
description:
- This option controls the autodecryption of source files using vault.
- This option controls the auto-decryption of source files using vault.
type: bool
default: yes
version_added: '2.4'

@ -43,7 +43,7 @@ UUID_NAMESPACE_ANSIBLE = uuid.UUID('361E6D51-FAEC-444A-9079-341386DA8E2E')
def to_yaml(a, *args, **kw):
'''Make verbose, human readable yaml'''
'''Make verbose, human-readable yaml'''
default_flow_style = kw.pop('default_flow_style', None)
try:
transformed = yaml.dump(a, Dumper=AnsibleDumper, allow_unicode=True, default_flow_style=default_flow_style, **kw)
@ -53,7 +53,7 @@ def to_yaml(a, *args, **kw):
def to_nice_yaml(a, indent=4, *args, **kw):
'''Make verbose, human readable yaml'''
'''Make verbose, human-readable yaml'''
try:
transformed = yaml.dump(a, Dumper=AnsibleDumper, indent=indent, allow_unicode=True, default_flow_style=False, **kw)
except Exception as e:
@ -74,7 +74,7 @@ def to_json(a, *args, **kw):
def to_nice_json(a, indent=4, sort_keys=True, *args, **kw):
'''Make verbose, human readable JSON'''
'''Make verbose, human-readable JSON'''
return to_json(a, indent=indent, sort_keys=sort_keys, separators=(',', ': '), *args, **kw)

@ -5,7 +5,7 @@ DOCUMENTATION:
description:
- Converts a YAML documents in a string representation into an equivalent structured Ansible variable.
- Ansible internally auto-converts YAML strings into variable structures in most contexts, but by default does not handle 'multi document' YAML files or strings.
- If multiple YAML documents are not supplied, this is the equivalend of using C(from_yaml).
- If multiple YAML documents are not supplied, this is the equivalence of using C(from_yaml).
notes:
- This filter functions as a wrapper to the Python C(yaml.safe_load_all) function, part of the L(pyyaml Python library, https://pypi.org/project/PyYAML/).
- Possible conflicts in variable names from the multiple documents are resolved directly by the pyyaml library.

@ -1,9 +1,9 @@
DOCUMENTATION:
name: human_redable
version_added: "historical"
short_description: Make bytes/bits human readable
short_description: Make bytes/bits human-readable
description:
- Convert byte or bit figures to more human readable formats.
- Convert byte or bit figures to more human-readable formats.
positional: _input, isbits, unit
options:
_input:
@ -31,5 +31,5 @@ EXAMPLES: |
RETURN:
_value:
description: Human readable byte or bit size.
description: human-readable byte or bit size.
type: str

@ -3,11 +3,11 @@ DOCUMENTATION:
version_added: "historical"
short_description: Get bytes from string
description:
- Convert a human readable byte or bit string into a number bytes.
- Convert a human-readable byte or bit string into a number bytes.
positional: _input, default_unit, isbits
options:
_input:
description: Human readable description of a number of bytes.
description: human-readable description of a number of bytes.
type: int
required: true
default_unit:

@ -1,7 +1,7 @@
DOCUMENTATION:
name: mandatory
version_added: "historical"
short_description: make a variable's existance mandatory
short_description: make a variable's existence mandatory
description:
- Depending on context undefined variables can be ignored or skipped, this ensures they force an error.
positional: _input

@ -145,7 +145,7 @@ def inversepower(x, base=2):
def human_readable(size, isbits=False, unit=None):
''' Return a human readable string '''
''' Return a human-readable string '''
try:
return formatters.bytes_to_human(size, isbits, unit)
except TypeError as e:
@ -155,7 +155,7 @@ def human_readable(size, isbits=False, unit=None):
def human_to_bytes(size, default_unit=None, isbits=False):
''' Return bytes count from a human readable string '''
''' Return bytes count from a human-readable string '''
try:
return formatters.human_to_bytes(size, default_unit, isbits)
except TypeError as e:

@ -5,7 +5,7 @@ DOCUMENTATION:
positional: _input, _additional_lists
description: Iterate over several iterables in parallel, producing tuples with an item from each one.
notes:
- This is mostly a passhtrough to Python's C(zip) function.
- This is mostly a passthrough to Python's C(zip) function.
options:
_input:
description: Original list.

@ -8,7 +8,7 @@ DOCUMENTATION:
If the iterables are of uneven length, missing values are filled-in with O(fillvalue).
Iteration continues until the longest iterable is exhausted.
notes:
- This is mostly a passhtrough to Python's C(itertools.zip_longest) function
- This is mostly a passthrough to Python's C(itertools.zip_longest) function
options:
_input:
description: Original list.

@ -34,7 +34,7 @@ def get_composite_name(collection, name, path, depth):
resolved_collection = 'ansible.builtin'
resource_name = '.'.join(name.split(f"{resolved_collection}.")[1:])
# collectionize name
# create FQCN
composite = [resolved_collection]
if depth:
composite.extend(path.split(os.path.sep)[depth * -1:])

@ -1277,7 +1277,7 @@ class Jinja2Loader(PluginLoader):
fq_name = '.'.join((parent_prefix, func_name))
src_name = f"ansible_collections.{acr.collection}.plugins.{self.type}.{acr.subdirs}.{func_name}"
# TODO: load anyways into CACHE so we only match each at end of loop
# the files themseves should already be cached by base class caching of modules(python)
# the files themselves should already be cached by base class caching of modules(python)
if key in (func_name, fq_name):
plugin = self._plugin_wrapper_type(func)
if plugin:
@ -1426,7 +1426,7 @@ def _load_plugin_filter():
display.warning(u'The plugin filter file, {0} does not exist.'
u' Skipping.'.format(filter_cfg))
# Specialcase the stat module as Ansible can run very few things if stat is rejected
# Special case: the stat module as Ansible can run very few things if stat is rejected
if 'stat' in filters['ansible.modules']:
raise AnsibleError('The stat module was specified in the module reject list file, {0}, but'
' Ansible will not function without the stat module. Please remove stat'

@ -82,7 +82,7 @@ from ansible.module_utils.common.text.converters import to_bytes, to_native, to_
class CSVRecoder:
"""
Iterator that reads an encoded stream and reencodes the input to UTF-8
Iterator that reads an encoded stream and encodes the input to UTF-8
"""
def __init__(self, f, encoding='utf-8'):
self.reader = codecs.getreader(encoding)(f)

@ -197,7 +197,7 @@ class LookupModule(LookupBase):
f = os.path.join(path, fn)
total_search.append(f)
elif filelist:
# NOTE: this is now 'extend', previouslly it would clobber all options, but we deemed that a bug
# NOTE: this is now 'extend', previously it would clobber all options, but we deemed that a bug
total_search.extend(filelist)
else:
total_search.append(term)

@ -6,7 +6,7 @@ DOCUMENTATION:
aliases: [change]
description:
- Tests if task required changes to complete
- This test checks for the existance of a C(changed) key in the input dictionary and that it is V(True) if present
- This test checks for the existence of a C(changed) key in the input dictionary and that it is V(True) if present
options:
_input:
description: registered result from an Ansible task

@ -136,7 +136,7 @@ def regex(value='', pattern='', ignorecase=False, multiline=False, match_type='s
def vault_encrypted(value):
"""Evaulate whether a variable is a single vault encrypted value
"""Evaluate whether a variable is a single vault encrypted value
.. versionadded:: 2.10
"""

@ -6,7 +6,7 @@ DOCUMENTATION:
aliases: [failure]
description:
- Tests if task finished in failure, opposite of C(succeeded).
- This test checks for the existance of a C(failed) key in the input dictionary and that it is V(True) if present.
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(True) if present.
- Tasks that get skipped or not executed due to other failures (syntax, templating, unreachable host, etc) do not return a 'failed' status.
options:
_input:

@ -4,8 +4,8 @@ DOCUMENTATION:
version_added: "1.9"
short_description: Did async task finish
description:
- Used to test if an async task has finished, it will aslo work with normal tasks but will issue a warning.
- This test checks for the existance of a C(finished) key in the input dictionary and that it is V(1) if present
- Used to test if an async task has finished, it will also work with normal tasks but will issue a warning.
- This test checks for the existence of a C(finished) key in the input dictionary and that it is V(1) if present
options:
_input:
description: registered result from an Ansible task

@ -15,7 +15,7 @@ DOCUMENTATION:
type: string
required: True
ignorecase:
description: Use case insenstive matching.
description: Use case insensitive matching.
type: boolean
default: False
multiline:

@ -5,7 +5,7 @@ DOCUMENTATION:
short_description: Task did not end due to unreachable host
description:
- Tests if task was able to reach the host for execution
- This test checks for the existance of a C(unreachable) key in the input dictionary and that it is V(False) if present
- This test checks for the existence of a C(unreachable) key in the input dictionary and that it is V(False) if present
options:
_input:
description: registered result from an Ansible task

@ -14,7 +14,7 @@ DOCUMENTATION:
type: string
required: True
ignorecase:
description: Use case insenstive matching.
description: Use case insensitive matching.
type: boolean
default: False
multiline:

@ -14,7 +14,7 @@ DOCUMENTATION:
type: string
required: True
ignorecase:
description: Use case insenstive matching.
description: Use case insensitive matching.
type: boolean
default: False
multiline:

@ -6,7 +6,7 @@ DOCUMENTATION:
aliases: [skip]
description:
- Tests if task was skipped
- This test checks for the existance of a C(skipped) key in the input dictionary and that it is V(True) if present
- This test checks for the existence of a C(skipped) key in the input dictionary and that it is V(True) if present
options:
_input:
description: registered result from an Ansible task

@ -5,7 +5,7 @@ DOCUMENTATION:
short_description: Was async task started
description:
- Used to check if an async task has started, will also work with non async tasks but will issue a warning.
- This test checks for the existance of a C(started) key in the input dictionary and that it is V(1) if present
- This test checks for the existence of a C(started) key in the input dictionary and that it is V(1) if present
options:
_input:
description: registered result from an Ansible task

@ -6,7 +6,7 @@ DOCUMENTATION:
aliases: [succeeded, successful]
description:
- Tests if task finished successfully, opposite of C(failed).
- This test checks for the existance of a C(failed) key in the input dictionary and that it is V(False) if present
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(False) if present
options:
_input:
description: registered result from an Ansible task

@ -5,7 +5,7 @@ DOCUMENTATION:
short_description: Did task end due to the host was unreachable
description:
- Tests if task was not able to reach the host for execution
- This test checks for the existance of a C(unreachable) key in the input dictionary and that it's value is V(True)
- This test checks for the existence of a C(unreachable) key in the input dictionary and that it's value is V(True)
options:
_input:
description: registered result from an Ansible task

Loading…
Cancel
Save