Created
October 5, 2023 19:22
-
-
Save Akasurde/5b7d1ba3c14afc6997a2295047a83a13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py | |
index d14832f58e..8cbbe5552a 100755 | |
--- a/lib/ansible/cli/doc.py | |
+++ b/lib/ansible/cli/doc.py | |
@@ -815,7 +815,7 @@ class DocCLI(CLI, RoleMixin): | |
else: | |
plugin_names = self._list_plugins(ptype, None) | |
docs['all'][ptype] = self._get_plugins_docs(ptype, plugin_names, fail_ok=(ptype in ('test', 'filter')), fail_on_errors=no_fail) | |
- # reset list after each type to avoid polution | |
+ # reset list after each type to avoid pollution | |
elif listing: | |
if plugin_type == 'keyword': | |
docs = DocCLI._list_keywords() | |
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py | |
index 59c9eae40e..39bcf2b48e 100644 | |
--- a/lib/ansible/executor/task_executor.py | |
+++ b/lib/ansible/executor/task_executor.py | |
@@ -225,7 +225,7 @@ class TaskExecutor: | |
if self._task.loop_with: | |
if self._task.loop_with in self._shared_loader_obj.lookup_loader: | |
- # TODO: hardcoded so it fails for non first_found lookups, but thhis shoudl be generalized for those that don't do their own templating | |
+ # TODO: hardcoded so it fails for non first_found lookups, but this should be generalized for those that don't do their own templating | |
# lookup prop/attribute? | |
fail = bool(self._task.loop_with != 'first_found') | |
loop_terms = listify_lookup_plugin_terms(terms=self._task.loop, templar=templar, fail_on_undefined=fail, convert_bare=False) | |
diff --git a/lib/ansible/galaxy/dependency_resolution/providers.py b/lib/ansible/galaxy/dependency_resolution/providers.py | |
index f13d3ecf2d..97b7315be9 100644 | |
--- a/lib/ansible/galaxy/dependency_resolution/providers.py | |
+++ b/lib/ansible/galaxy/dependency_resolution/providers.py | |
@@ -136,7 +136,7 @@ class CollectionDependencyProviderBase(AbstractProvider): | |
:param resolutions: Mapping of identifier, candidate pairs. | |
- :param candidates: Possible candidates for the identifer. | |
+ :param candidates: Possible candidates for the identifier. | |
Mapping of identifier, list of candidate pairs. | |
:param information: Requirement information of each package. | |
@@ -443,7 +443,7 @@ class CollectionDependencyProviderBase(AbstractProvider): | |
# NOTE: This guard expression MUST perform an early exit only | |
# NOTE: after the `get_collection_dependencies()` call because | |
- # NOTE: internally it polulates the artifact URL of the candidate, | |
+ # NOTE: internally it populates the artifact URL of the candidate, | |
# NOTE: its SHA hash and the Galaxy API token. These are still | |
# NOTE: necessary with `--no-deps` because even with the disabled | |
# NOTE: dependency resolution the outer layer will still need to | |
diff --git a/lib/ansible/galaxy/dependency_resolution/reporters.py b/lib/ansible/galaxy/dependency_resolution/reporters.py | |
index 69908b2243..7a63746f3a 100644 | |
--- a/lib/ansible/galaxy/dependency_resolution/reporters.py | |
+++ b/lib/ansible/galaxy/dependency_resolution/reporters.py | |
@@ -1,7 +1,7 @@ | |
# -*- coding: utf-8 -*- | |
# Copyright: (c) 2020-2021, Ansible Project | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
-"""Requiement reporter implementations.""" | |
+"""Requirement reporter implementations.""" | |
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
diff --git a/lib/ansible/module_utils/common/network.py b/lib/ansible/module_utils/common/network.py | |
index c3874f89e1..baa9df91d2 100644 | |
--- a/lib/ansible/module_utils/common/network.py | |
+++ b/lib/ansible/module_utils/common/network.py | |
@@ -62,7 +62,7 @@ def to_masklen(val): | |
def to_subnet(addr, mask, dotted_notation=False): | |
- """ coverts an addr / mask pair to a subnet in cidr notation """ | |
+ """ converts an addr / mask pair to a subnet in cidr notation """ | |
try: | |
if not is_masklen(mask): | |
raise ValueError | |
diff --git a/lib/ansible/module_utils/facts/hardware/sunos.py b/lib/ansible/module_utils/facts/hardware/sunos.py | |
index 54850fe3bd..5be4046a24 100644 | |
--- a/lib/ansible/module_utils/facts/hardware/sunos.py | |
+++ b/lib/ansible/module_utils/facts/hardware/sunos.py | |
@@ -108,7 +108,7 @@ class SunOSHardware(Hardware): | |
# Counting cores on Solaris can be complicated. | |
# https://blogs.oracle.com/mandalika/entry/solaris_show_me_the_cpu | |
# Treat 'processor_count' as physical sockets and 'processor_cores' as | |
- # virtual CPUs visisble to Solaris. Not a true count of cores for modern SPARC as | |
+ # virtual CPUs visible to Solaris. Not a true count of cores for modern SPARC as | |
# these processors have: sockets -> cores -> threads/virtual CPU. | |
if len(sockets) > 0: | |
cpu_facts['processor_count'] = len(sockets) | |
diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py | |
index 5ba3bd78bb..eb19067bc8 100644 | |
--- a/lib/ansible/plugins/action/__init__.py | |
+++ b/lib/ansible/plugins/action/__init__.py | |
@@ -102,7 +102,7 @@ class ActionBase(ABC): | |
etc) associated with this task. | |
:returns: dictionary of results from the module | |
- Implementors of action modules may find the following variables especially useful: | |
+ Implementers of action modules may find the following variables especially useful: | |
* Module parameters. These are stored in self._task.args | |
""" | |
diff --git a/lib/ansible/plugins/action/add_host.py b/lib/ansible/plugins/action/add_host.py | |
index ede2e05f91..eade192f16 100644 | |
--- a/lib/ansible/plugins/action/add_host.py | |
+++ b/lib/ansible/plugins/action/add_host.py | |
@@ -51,7 +51,7 @@ class ActionModule(ActionBase): | |
# TODO: create 'conflict' detection in base class to deal with repeats and aliases and warn user | |
args = combine_vars(raw, args) | |
else: | |
- raise AnsibleActionFail('Invalid raw parameters passed, requires a dictonary/mapping got a %s' % type(raw)) | |
+ raise AnsibleActionFail('Invalid raw parameters passed, requires a dictionary/mapping got a %s' % type(raw)) | |
# Parse out any hostname:port patterns | |
new_name = args.get('name', args.get('hostname', args.get('host', None))) | |
diff --git a/lib/ansible/plugins/action/gather_facts.py b/lib/ansible/plugins/action/gather_facts.py | |
index 23962c833c..891ff53ba4 100644 | |
--- a/lib/ansible/plugins/action/gather_facts.py | |
+++ b/lib/ansible/plugins/action/gather_facts.py | |
@@ -26,7 +26,7 @@ class ActionModule(ActionBase): | |
# deal with 'setup specific arguments' | |
if fact_module not in C._ACTION_SETUP: | |
- # TODO: remove in favor of controller side argspec detecing valid arguments | |
+ # TODO: remove in favor of controller side argspec detecting valid arguments | |
# network facts modules must support gather_subset | |
try: | |
name = self._connection.ansible_name.removeprefix('ansible.netcommon.') | |
@@ -123,7 +123,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: | |
diff --git a/lib/ansible/plugins/action/template.py b/lib/ansible/plugins/action/template.py | |
index 4bfd967053..1b9c60e352 100644 | |
--- a/lib/ansible/plugins/action/template.py | |
+++ b/lib/ansible/plugins/action/template.py | |
@@ -44,7 +44,7 @@ class ActionModule(ActionBase): | |
del tmp # tmp no longer has any effect | |
# Options type validation | |
- # stings | |
+ # strings | |
for s_type in ('src', 'dest', 'state', 'newline_sequence', 'variable_start_string', 'variable_end_string', 'block_start_string', | |
'block_end_string', 'comment_start_string', 'comment_end_string'): | |
if s_type in self._task.args: | |
diff --git a/lib/ansible/plugins/inventory/yaml.py b/lib/ansible/plugins/inventory/yaml.py | |
index 79af3dc665..f8a5651508 100644 | |
--- a/lib/ansible/plugins/inventory/yaml.py | |
+++ b/lib/ansible/plugins/inventory/yaml.py | |
@@ -114,7 +114,7 @@ class InventoryModule(BaseFileInventoryPlugin): | |
raise AnsibleParserError('Plugin configuration YAML file, not YAML inventory') | |
# We expect top level keys to correspond to groups, iterate over them | |
- # to get host, vars and subgroups (which we iterate over recursivelly) | |
+ # to get host, vars and subgroups (which we iterate over recursively) | |
if isinstance(data, MutableMapping): | |
for group_name in data: | |
self._parse_group(group_name, data[group_name]) | |
diff --git a/lib/ansible/plugins/lookup/dict.py b/lib/ansible/plugins/lookup/dict.py | |
index af9a081914..7429c61f9e 100644 | |
--- a/lib/ansible/plugins/lookup/dict.py | |
+++ b/lib/ansible/plugins/lookup/dict.py | |
@@ -49,7 +49,7 @@ tasks: | |
RETURN = """ | |
_list: | |
description: | |
- - list of composed dictonaries with key and value | |
+ - list of composed dictionaries with key and value | |
type: list | |
""" | |
diff --git a/lib/ansible/plugins/lookup/first_found.py b/lib/ansible/plugins/lookup/first_found.py | |
index d92e935467..117dfc69c1 100644 | |
--- a/lib/ansible/plugins/lookup/first_found.py | |
+++ b/lib/ansible/plugins/lookup/first_found.py | |
@@ -187,7 +187,7 @@ class LookupModule(LookupBase): | |
# NOTE: this is used as 'global' but can be set many times?!?!? | |
skip = self.get_option('skip') | |
- # magic extra spliting to create lists | |
+ # magic extra splitting to create lists | |
filelist = _split_on(files, ',;') | |
pathlist = _split_on(paths, ',:;') | |
@@ -239,6 +239,6 @@ class LookupModule(LookupBase): | |
# if we get here, no file was found | |
if skip: | |
- # NOTE: global skip wont matter, only last 'skip' value in dict term | |
+ # NOTE: global skip won't matter, only last 'skip' value in dict term | |
return [] | |
raise AnsibleLookupError("No file was found when using first_found.") | |
diff --git a/lib/ansible/plugins/shell/__init__.py b/lib/ansible/plugins/shell/__init__.py | |
index c9f8addabd..fafd1e61d2 100644 | |
--- a/lib/ansible/plugins/shell/__init__.py | |
+++ b/lib/ansible/plugins/shell/__init__.py | |
@@ -65,12 +65,12 @@ class ShellBase(AnsiblePlugin): | |
# TODO: config system should already resolve this so we should be able to just iterate over dicts | |
env = self.get_option('environment') | |
if isinstance(env, string_types): | |
- raise AnsibleError('The "envirionment" keyword takes a list of dictionaries or a dictionary, not a string') | |
+ raise AnsibleError('The "environment" keyword takes a list of dictionaries or a dictionary, not a string') | |
if not isinstance(env, Sequence): | |
env = [env] | |
for env_dict in env: | |
if not isinstance(env_dict, Mapping): | |
- raise AnsibleError('The "envirionment" keyword takes a list of dictionaries (or single dictionary), but got a "%s" instead' % type(env_dict)) | |
+ raise AnsibleError('The "environment" keyword takes a list of dictionaries (or single dictionary), but got a "%s" instead' % type(env_dict)) | |
self.env.update(env_dict) | |
# We can remove the try: except in the future when we make ShellBase a proper subset of | |
@@ -147,7 +147,7 @@ class ShellBase(AnsiblePlugin): | |
# other users can read and access the tmp directory. | |
# This is because we use system to create tmp dirs for unprivileged users who are | |
# sudo'ing to a second unprivileged user. | |
- # The 'system_tmpdirs' setting defines dirctories we can use for this purpose | |
+ # The 'system_tmpdirs' setting defines directories we can use for this purpose | |
# the default are, /tmp and /var/tmp. | |
# So we only allow one of those locations if system=True, using the | |
# passed in tmpdir if it is valid or the first one from the setting if not. | |
diff --git a/lib/ansible/plugins/terminal/__init__.py b/lib/ansible/plugins/terminal/__init__.py | |
index 2a280a91f8..cd1326df67 100644 | |
--- a/lib/ansible/plugins/terminal/__init__.py | |
+++ b/lib/ansible/plugins/terminal/__init__.py | |
@@ -85,7 +85,7 @@ class TerminalBase(ABC): | |
This method is called right after the invoke_shell() is called from | |
the Paramiko SSHClient instance. It provides an opportunity to setup | |
- terminal parameters such as disbling paging for instance. | |
+ terminal parameters such as disabling paging for instance. | |
""" | |
pass | |
diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py | |
index e611893953..975165f9ec 100644 | |
--- a/lib/ansible/template/__init__.py | |
+++ b/lib/ansible/template/__init__.py | |
@@ -482,7 +482,7 @@ class JinjaPluginIntercept(MutableMapping): | |
self._seen_it.remove(key) | |
raise TemplateSyntaxError('Could not load "%s": %s' % (key, to_native(original_exc or e)), 0) | |
- # if i do have func and it is a filter, it nees wrapping | |
+ # if i do have func and it is a filter, it needs wrapping | |
if self._pluginloader.type == 'filter': | |
# filter need wrapping | |
if key in C.STRING_TYPE_FILTERS: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Akasurde i like to work on this