From ec585392e5a8f43cbfb50fb9a9ddf7d7bdafe508 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Dec 2024 13:29:58 +0100 Subject: [PATCH] Docs: fix its vs. it's (#9442) * Fix its vs. it's. * Improvements from review. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Improve formulations. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/become/pfexec.py | 2 +- plugins/callback/dense.py | 2 +- plugins/connection/chroot.py | 4 ++-- plugins/connection/jail.py | 2 +- plugins/connection/zone.py | 2 +- plugins/inventory/cobbler.py | 2 +- plugins/inventory/gitlab_runners.py | 2 +- plugins/inventory/proxmox.py | 4 ++-- plugins/inventory/virtualbox.py | 2 +- plugins/lookup/flattened.py | 2 +- plugins/module_utils/_filelock.py | 4 ++-- plugins/module_utils/identity/keycloak/keycloak.py | 8 ++++---- .../identity/keycloak/keycloak_clientsecret.py | 2 +- plugins/module_utils/redfish_utils.py | 8 ++++---- plugins/modules/capabilities.py | 2 +- plugins/modules/clc_server.py | 2 +- plugins/modules/dnsmadeeasy.py | 2 +- plugins/modules/dpkg_divert.py | 2 +- plugins/modules/gitlab_label.py | 4 ++-- plugins/modules/hg.py | 2 +- plugins/modules/influxdb_retention_policy.py | 2 +- plugins/modules/interfaces_file.py | 2 +- plugins/modules/ipa_user.py | 2 +- plugins/modules/java_cert.py | 2 +- plugins/modules/jenkins_job_info.py | 4 ++-- plugins/modules/jenkins_script.py | 4 ++-- plugins/modules/keycloak_authentication.py | 2 +- plugins/modules/keycloak_user_federation.py | 2 +- plugins/modules/keycloak_userprofile.py | 4 ++-- plugins/modules/kibana_plugin.py | 2 +- plugins/modules/lvg.py | 2 +- plugins/modules/lxc_container.py | 6 +++--- plugins/modules/macports.py | 4 ++-- plugins/modules/manageiq_alerts.py | 2 +- plugins/modules/memset_zone_domain.py | 2 +- plugins/modules/monit.py | 2 +- plugins/modules/oci_vcn.py | 4 ++-- plugins/modules/one_vm.py | 2 +- plugins/modules/oneandone_server.py | 2 +- plugins/modules/openbsd_pkg.py | 2 +- plugins/modules/ovh_ip_failover.py | 2 +- plugins/modules/packet_device.py | 2 +- plugins/modules/packet_ip_subnet.py | 2 +- plugins/modules/pear.py | 2 +- plugins/modules/pkgin.py | 2 +- plugins/modules/pkgutil.py | 2 +- plugins/modules/pmem.py | 2 +- plugins/modules/proxmox.py | 2 +- plugins/modules/proxmox_kvm.py | 4 ++-- plugins/modules/puppet.py | 2 +- plugins/modules/rundeck_acl_policy.py | 6 +++--- plugins/modules/sensu_client.py | 4 ++-- plugins/modules/sensu_handler.py | 4 ++-- plugins/modules/sl_vm.py | 4 ++-- plugins/modules/solaris_zone.py | 2 +- plugins/modules/timezone.py | 4 ++-- plugins/modules/udm_share.py | 2 +- plugins/modules/vdo.py | 2 +- plugins/modules/vmadm.py | 10 +++++----- plugins/modules/xml.py | 2 +- 60 files changed, 88 insertions(+), 88 deletions(-) diff --git a/plugins/become/pfexec.py b/plugins/become/pfexec.py index d3b98a6317..8794b6173c 100644 --- a/plugins/become/pfexec.py +++ b/plugins/become/pfexec.py @@ -15,7 +15,7 @@ DOCUMENTATION = ''' become_user: description: - User you 'become' to execute the task. - - This plugin ignores this setting as pfexec uses it's own C(exec_attr) to figure this out, + - This plugin ignores this setting as pfexec uses its own C(exec_attr) to figure this out, but it is supplied here for Ansible to make decisions needed for the task execution, like file permissions. type: string default: root diff --git a/plugins/callback/dense.py b/plugins/callback/dense.py index 88a2ff6742..2914a4695e 100644 --- a/plugins/callback/dense.py +++ b/plugins/callback/dense.py @@ -243,7 +243,7 @@ class CallbackModule(CallbackModule_default): def _handle_exceptions(self, result): if 'exception' in result: - # Remove the exception from the result so it's not shown every time + # Remove the exception from the result so it is not shown every time del result['exception'] if self._display.verbosity == 1: diff --git a/plugins/connection/chroot.py b/plugins/connection/chroot.py index b0200fdbcb..dea410debe 100644 --- a/plugins/connection/chroot.py +++ b/plugins/connection/chroot.py @@ -126,7 +126,7 @@ class Connection(ConnectionBase): # Want to check for a usable bourne shell inside the chroot. # is_executable() == True is sufficient. For symlinks it # gets really complicated really fast. So we punt on finding that - # out. As long as it's a symlink we assume that it will work + # out. As long as it is a symlink we assume that it will work if not (is_executable(chrootsh) or (os.path.lexists(chrootsh) and os.path.islink(chrootsh))): raise AnsibleError(f"{self.chroot} does not look like a chrootable dir (/bin/sh missing)") @@ -186,7 +186,7 @@ class Connection(ConnectionBase): exist in any given chroot. So for now we're choosing "/" instead. This also happens to be the former default. - Can revisit using $HOME instead if it's a problem + Can revisit using $HOME instead if it is a problem """ if not remote_path.startswith(os.path.sep): remote_path = os.path.join(os.path.sep, remote_path) diff --git a/plugins/connection/jail.py b/plugins/connection/jail.py index 1ebe5b26ef..c5fd766605 100644 --- a/plugins/connection/jail.py +++ b/plugins/connection/jail.py @@ -144,7 +144,7 @@ class Connection(ConnectionBase): exist in any given chroot. So for now we're choosing "/" instead. This also happens to be the former default. - Can revisit using $HOME instead if it's a problem + Can revisit using $HOME instead if it is a problem """ if not remote_path.startswith(os.path.sep): remote_path = os.path.join(os.path.sep, remote_path) diff --git a/plugins/connection/zone.py b/plugins/connection/zone.py index 77d85ad0ee..ac26f12e78 100644 --- a/plugins/connection/zone.py +++ b/plugins/connection/zone.py @@ -140,7 +140,7 @@ class Connection(ConnectionBase): exist in any given chroot. So for now we're choosing "/" instead. This also happens to be the former default. - Can revisit using $HOME instead if it's a problem + Can revisit using $HOME instead if it is a problem """ if not remote_path.startswith(os.path.sep): remote_path = os.path.join(os.path.sep, remote_path) diff --git a/plugins/inventory/cobbler.py b/plugins/inventory/cobbler.py index 2b056ed9bf..7d65f583d6 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -20,7 +20,7 @@ DOCUMENTATION = ''' - inventory_cache options: plugin: - description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as it's own. + description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as its own. type: string required: true choices: [ 'cobbler', 'community.general.cobbler' ] diff --git a/plugins/inventory/gitlab_runners.py b/plugins/inventory/gitlab_runners.py index 302ccad9b7..9a467905dd 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -22,7 +22,7 @@ DOCUMENTATION = ''' - Uses a YAML configuration file gitlab_runners.[yml|yaml]. options: plugin: - description: The name of this plugin, it should always be set to 'gitlab_runners' for this plugin to recognize it as it's own. + description: The name of this plugin, it should always be set to 'gitlab_runners' for this plugin to recognize it as its own. type: str required: true choices: diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 656304a2d5..cf25efc58c 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -25,7 +25,7 @@ DOCUMENTATION = ''' - inventory_cache options: plugin: - description: The name of this plugin, it should always be set to V(community.general.proxmox) for this plugin to recognize it as it's own. + description: The name of this plugin, it should always be set to V(community.general.proxmox) for this plugin to recognize it as its own. required: true choices: ['community.general.proxmox'] type: str @@ -403,7 +403,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): if "error" in ifaces: if "class" in ifaces["error"]: # This happens on Windows, even though qemu agent is running, the IP address - # cannot be fetched, as it's unsupported, also a command disabled can happen. + # cannot be fetched, as it is unsupported, also a command disabled can happen. errorClass = ifaces["error"]["class"] if errorClass in ["Unsupported"]: self.display.v("Retrieving network interfaces from guest agents on windows with older qemu-guest-agents is not supported") diff --git a/plugins/inventory/virtualbox.py b/plugins/inventory/virtualbox.py index 2ddb1ebb2b..b0545319a1 100644 --- a/plugins/inventory/virtualbox.py +++ b/plugins/inventory/virtualbox.py @@ -257,7 +257,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): def _handle_vboxmanage_group_string(self, vboxmanage_group, current_host, cacheable_results): '''Handles parsing the VM's Group assignment from VBoxManage according to VirtualBox documentation.''' # Per the VirtualBox documentation, a VM can be part of many groups, - # and it's possible to have nested groups. + # and it is possible to have nested groups. # Many groups are separated by commas ",", and nested groups use # slash "/". # https://www.virtualbox.org/manual/UserManual.html#gui-vmgroups diff --git a/plugins/lookup/flattened.py b/plugins/lookup/flattened.py index 0071417a0d..5365f2ca99 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -78,7 +78,7 @@ class LookupModule(LookupBase): term = term2 if isinstance(term, list): - # if it's a list, check recursively for items that are a list + # if it is a list, check recursively for items that are a list term = self._do_flatten(term, variables) ret.extend(term) else: diff --git a/plugins/module_utils/_filelock.py b/plugins/module_utils/_filelock.py index a35d0b91cf..4e782064be 100644 --- a/plugins/module_utils/_filelock.py +++ b/plugins/module_utils/_filelock.py @@ -46,8 +46,8 @@ class FileLock: ''' Create a lock file based on path with flock to prevent other processes using given path. - Please note that currently file locking only works when it's executed by - the same user, I.E single user scenarios + Please note that currently file locking only works when it is executed by + the same user, for example single user scenarios :kw path: Path (file) to lock :kw tmpdir: Path where to place the temporary .lock file diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 15603331b0..a9867b9b08 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -1160,8 +1160,8 @@ class KeycloakAPI(object): # prefer an exception since this is almost certainly a programming error in the module itself. raise Exception("Unable to delete group - one of group ID or name must be provided.") - # only lookup the name if cid isn't provided. - # in the case that both are provided, prefer the ID, since it's one + # only lookup the name if cid is not provided. + # in the case that both are provided, prefer the ID, since it is one # less lookup. if cid is None and name is not None: for clientscope in self.get_clientscopes(realm=realm): @@ -1719,7 +1719,7 @@ class KeycloakAPI(object): raise Exception("Unable to delete group - one of group ID or name must be provided.") # only lookup the name if groupid isn't provided. - # in the case that both are provided, prefer the ID, since it's one + # in the case that both are provided, prefer the ID, since it is one # less lookup. if groupid is None and name is not None: for group in self.get_groups(realm=realm): @@ -2071,7 +2071,7 @@ class KeycloakAPI(object): def get_authentication_flow_by_alias(self, alias, realm='master'): """ - Get an authentication flow by it's alias + Get an authentication flow by its alias :param alias: Alias of the authentication flow to get. :param realm: Realm. :return: Authentication flow representation. diff --git a/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py b/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py index 85caa8e16b..366322c9df 100644 --- a/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py +++ b/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py @@ -61,7 +61,7 @@ def keycloak_clientsecret_module_resolve_params(module, kc): client_id = module.params.get('client_id') # only lookup the client_id if id isn't provided. - # in the case that both are provided, prefer the ID, since it's one + # in the case that both are provided, prefer the ID, since it is one # less lookup. if id is None: # Due to the required_one_of spec, client_id is guaranteed to not be None diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 253395ea93..f9649ce6d7 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -119,7 +119,7 @@ class RedfishUtils(object): # Note: This is also a fallthrough for properties that are # arrays of objects. Some services erroneously omit properties - # within arrays of objects when not configured, and it's + # within arrays of objects when not configured, and it is # expecting the client to provide them anyway. if req_pyld[prop] != cur_pyld[prop]: @@ -1177,7 +1177,7 @@ class RedfishUtils(object): return response # If requested to wait for the service to be available again, block - # until it's ready + # until it is ready if wait: elapsed_time = 0 start_time = time.time() @@ -1190,7 +1190,7 @@ class RedfishUtils(object): while elapsed_time <= wait_timeout: status = self.check_service_availability() if status['available']: - # It's available; we're done + # It is available; we are done break time.sleep(5) elapsed_time = time.time() - start_time @@ -1813,7 +1813,7 @@ class RedfishUtils(object): operation_results['status'] = data.get('TaskState', data.get('JobState')) operation_results['messages'] = data.get('Messages', []) else: - # Error response body, which is a bit of a misnomer since it's used in successful action responses + # Error response body, which is a bit of a misnomer since it is used in successful action responses operation_results['status'] = 'Completed' if response.status >= 400: operation_results['status'] = 'Exception' diff --git a/plugins/modules/capabilities.py b/plugins/modules/capabilities.py index 18c56605b9..088c15e4f6 100644 --- a/plugins/modules/capabilities.py +++ b/plugins/modules/capabilities.py @@ -92,7 +92,7 @@ class CapabilitiesModule(object): if self.module.check_mode: self.module.exit_json(changed=True, msg='capabilities changed') else: - # remove from current cap list if it's already set (but op/flags differ) + # remove from current cap list if it is already set (but op/flags differ) current = list(filter(lambda x: x[0] != self.capability_tup[0], current)) # add new cap with correct op/flags current.append(self.capability_tup) diff --git a/plugins/modules/clc_server.py b/plugins/modules/clc_server.py index 156fc6dee6..34b12edcc2 100644 --- a/plugins/modules/clc_server.py +++ b/plugins/modules/clc_server.py @@ -804,7 +804,7 @@ class ClcServer: @staticmethod def _validate_name(module): """ - Validate that name is the correct length if provided, fail if it's not + Validate that name is the correct length if provided, fail if it is not :param module: the module to validate :return: none """ diff --git a/plugins/modules/dnsmadeeasy.py b/plugins/modules/dnsmadeeasy.py index 742d50c3f2..3e9104b575 100644 --- a/plugins/modules/dnsmadeeasy.py +++ b/plugins/modules/dnsmadeeasy.py @@ -486,7 +486,7 @@ class DME2(object): return self.query(self.record_url, 'GET')['data'] def _instMap(self, type): - # @TODO cache this call so it's executed only once per ansible execution + # @TODO cache this call so it is executed only once per ansible execution map = {} results = {} diff --git a/plugins/modules/dpkg_divert.py b/plugins/modules/dpkg_divert.py index d74d8ba039..5783e2b314 100644 --- a/plugins/modules/dpkg_divert.py +++ b/plugins/modules/dpkg_divert.py @@ -19,7 +19,7 @@ description: - A diversion is for C(dpkg) the knowledge that only a given package (or the local administrator) is allowed to install a file at a given location. Other packages shipping their own version of this file will be forced to O(divert) it, that is to install it at another location. It allows one to keep changes in a file provided by a debian package by preventing - its overwrite at package upgrade. + it being overwritten on package upgrade. - This module manages diversions of debian packages files using the C(dpkg-divert) commandline tool. It can either create or remove a diversion for a given file, but also update an existing diversion to modify its O(holder) and/or its O(divert) location. diff --git a/plugins/modules/gitlab_label.py b/plugins/modules/gitlab_label.py index 44fbf1ae02..8b9503e325 100644 --- a/plugins/modules/gitlab_label.py +++ b/plugins/modules/gitlab_label.py @@ -348,7 +348,7 @@ def native_python_main(this_gitlab, purge, requested_labels, state, module): item.pop('description_html') item.pop('text_color') item.pop('subscribed') - # field present only when it's a project's label + # field present only when it is a project's label if 'is_project_label' in item: item.pop('is_project_label') item['new_name'] = None @@ -472,7 +472,7 @@ def main(): if state == 'present': _existing_labels = [x.asdict()['name'] for x in this_gitlab.list_all_labels()] - # color is mandatory when creating label, but it's optional when changing name or updating other fields + # color is mandatory when creating label, but it is optional when changing name or updating other fields if any(x['color'] is None and x['new_name'] is None and x['name'] not in _existing_labels for x in label_list): module.fail_json(msg='color parameter is required for new labels') diff --git a/plugins/modules/hg.py b/plugins/modules/hg.py index fd539ba54d..92e10f8725 100644 --- a/plugins/modules/hg.py +++ b/plugins/modules/hg.py @@ -205,7 +205,7 @@ class Hg(object): if the desired changeset is already the current changeset. """ if self.revision is None or len(self.revision) < 7: - # Assume it's a rev number, tag, or branch + # Assume it is a rev number, tag, or branch return False (rc, out, err) = self._command(['--debug', 'id', '-i', '-R', self.dest]) if rc != 0: diff --git a/plugins/modules/influxdb_retention_policy.py b/plugins/modules/influxdb_retention_policy.py index cdd6bafb6d..332050fb1c 100644 --- a/plugins/modules/influxdb_retention_policy.py +++ b/plugins/modules/influxdb_retention_policy.py @@ -59,7 +59,7 @@ options: default: false shard_group_duration: description: - - Determines the time range covered by a shard group. If specified it must be at least one hour. If none, it's determined + - Determines the time range covered by a shard group. If specified it must be at least one hour. If not provided, it is determined by InfluxDB by the rentention policy's duration. Supports complex duration expressions with multiple units. type: str version_added: '2.0.0' diff --git a/plugins/modules/interfaces_file.py b/plugins/modules/interfaces_file.py index e878d10d1f..23bfd78790 100644 --- a/plugins/modules/interfaces_file.py +++ b/plugins/modules/interfaces_file.py @@ -46,7 +46,7 @@ options: type: str description: - If O(option) is not presented for the O(iface) and O(state) is V(present) option will be added. If O(option) already - exists and is not V(pre-up), V(up), V(post-up) or V(down), it's value will be updated. V(pre-up), V(up), V(post-up) + exists and is not V(pre-up), V(up), V(post-up) or V(down), its value will be updated. V(pre-up), V(up), V(post-up) and V(down) options cannot be updated, only adding new options, removing existing ones or cleaning the whole option set are supported. backup: diff --git a/plugins/modules/ipa_user.py b/plugins/modules/ipa_user.py index 039cf3cb70..47d50972bd 100644 --- a/plugins/modules/ipa_user.py +++ b/plugins/modules/ipa_user.py @@ -268,7 +268,7 @@ def get_user_diff(client, ipa_user, module_user): if 'sshpubkeyfp' in ipa_user and ipa_user['sshpubkeyfp'][0][:7].upper() == 'SHA256:': hash_algo = 'sha256' module_user['sshpubkeyfp'] = [get_ssh_key_fingerprint(pubkey, hash_algo) for pubkey in module_user['ipasshpubkey']] - # Remove the ipasshpubkey element as it is not returned from IPA but save it's value to be used later on + # Remove the ipasshpubkey element as it is not returned from IPA but save its value to be used later on sshpubkey = module_user['ipasshpubkey'] del module_user['ipasshpubkey'] diff --git a/plugins/modules/java_cert.py b/plugins/modules/java_cert.py index a205ecc789..8746c2d617 100644 --- a/plugins/modules/java_cert.py +++ b/plugins/modules/java_cert.py @@ -278,7 +278,7 @@ def _get_first_certificate_from_x509_file(module, pem_certificate_file, pem_cert (extract_rc, dummy, extract_stderr) = module.run_command(extract_cmd, check_rc=False) if extract_rc != 0: - # this time it's a real failure + # this time it is a real failure module.fail_json(msg="Internal module failure, cannot extract certificate, error: %s" % extract_stderr, rc=extract_rc, cmd=extract_cmd) diff --git a/plugins/modules/jenkins_job_info.py b/plugins/modules/jenkins_job_info.py index 40aa416968..f406ec3b4b 100644 --- a/plugins/modules/jenkins_job_info.py +++ b/plugins/modules/jenkins_job_info.py @@ -210,8 +210,8 @@ def get_jobs(module): jobs = all_jobs # python-jenkins includes the internal Jenkins class used for each job # in its return value; we strip that out because the leading underscore - # (and the fact that it's not documented in the python-jenkins docs) - # indicates that it's not part of the dependable public interface. + # (and the fact that it is not documented in the python-jenkins docs) + # indicates that it is not part of the dependable public interface. for job in jobs: if "_class" in job: del job["_class"] diff --git a/plugins/modules/jenkins_script.py b/plugins/modules/jenkins_script.py index 0f6064eeca..bd30f9daa7 100644 --- a/plugins/modules/jenkins_script.py +++ b/plugins/modules/jenkins_script.py @@ -61,8 +61,8 @@ options: description: - A dict of key-value pairs used in formatting the script using string.Template (see https://docs.python.org/2/library/string.html#template-strings). notes: - - Since the script can do anything this does not report on changes. Knowing the script is being run it's important to set - changed_when for the ansible output to be clear on any alterations made. + - Since the script can do anything this does not report on changes. Knowing the script is being run it is important to set + C(changed_when) for the ansible output to be clear on any alterations made. """ EXAMPLES = r""" diff --git a/plugins/modules/keycloak_authentication.py b/plugins/modules/keycloak_authentication.py index 1b47542bb3..58878c069d 100644 --- a/plugins/modules/keycloak_authentication.py +++ b/plugins/modules/keycloak_authentication.py @@ -246,7 +246,7 @@ def create_or_update_executions(kc, config, realm='master'): """ Create or update executions for an authentication flow. :param kc: Keycloak API access. - :param config: Representation of the authentication flow including it's executions. + :param config: Representation of the authentication flow including its executions. :param realm: Realm :return: tuple (changed, dict(before, after) WHERE diff --git a/plugins/modules/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py index 7c49510fd6..be8b75fc85 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -159,7 +159,7 @@ options: rdnLDAPAttribute: description: - - Name of LDAP attribute, which is used as RDN (top attribute) of typical user DN. Usually it's the same as Username LDAP attribute, + - Name of LDAP attribute, which is used as RDN (top attribute) of typical user DN. Usually it is the same as Username LDAP attribute, however it is not required. For example for Active directory, it is common to use V(cn) as RDN attribute when username attribute might be V(sAMAccountName). type: str diff --git a/plugins/modules/keycloak_userprofile.py b/plugins/modules/keycloak_userprofile.py index 1338c8154b..49b52c4521 100644 --- a/plugins/modules/keycloak_userprofile.py +++ b/plugins/modules/keycloak_userprofile.py @@ -424,7 +424,7 @@ def remove_null_values(data): # Recursively remove null values from lists return [remove_null_values(item) for item in data if item is not None] else: - # Return the data if it's neither a dictionary nor a list + # Return the data if it is neither a dictionary nor a list return data @@ -436,7 +436,7 @@ def camel_recursive(data): # Apply camelCase conversion to each item in the list return [camel_recursive(item) for item in data] else: - # Return the data as is if it's not a dict or list + # Return the data as-is if it is not a dict or list return data diff --git a/plugins/modules/kibana_plugin.py b/plugins/modules/kibana_plugin.py index 3d5b4d6413..953d3518a6 100644 --- a/plugins/modules/kibana_plugin.py +++ b/plugins/modules/kibana_plugin.py @@ -39,7 +39,7 @@ options: url: description: - Set exact URL to download the plugin from. - - For local file, prefix its absolute path with file://. + - For local file, prefix its absolute path with C(file://). type: str timeout: description: diff --git a/plugins/modules/lvg.py b/plugins/modules/lvg.py index f6f8abc020..01eca7b49c 100644 --- a/plugins/modules/lvg.py +++ b/plugins/modules/lvg.py @@ -61,7 +61,7 @@ options: default: '' state: description: - - Control if the volume group exists and it's state. + - Control if the volume group exists and its state. - The states V(active) and V(inactive) implies V(present) state. Added in 7.1.0. - If V(active) or V(inactive), the module manages the VG's logical volumes current state. The module also handles the VG's autoactivation state if supported unless when creating a volume group and the autoactivation option specified in O(vg_options). diff --git a/plugins/modules/lxc_container.py b/plugins/modules/lxc_container.py index 9b44c4fc89..7683fbfa4e 100644 --- a/plugins/modules/lxc_container.py +++ b/plugins/modules/lxc_container.py @@ -255,14 +255,14 @@ EXAMPLES = r""" ansible.builtin.debug: var: lvm_container_info -- name: Run a command in a container and ensure its in a "stopped" state. +- name: Run a command in a container and ensure it is in a "stopped" state. community.general.lxc_container: name: test-container-started state: stopped container_command: | echo 'hello world.' | tee /opt/stopped -- name: Run a command in a container and ensure its it in a "frozen" state. +- name: Run a command in a container and ensure it is in a "frozen" state. community.general.lxc_container: name: test-container-stopped state: frozen @@ -681,7 +681,7 @@ class LxcContainerManagement(object): """Configure an LXC container. Write new configuration values to the lxc config file. This will - stop the container if it's running write the new options and then + stop the container if it is running write the new options and then restart the container upon completion. """ diff --git a/plugins/modules/macports.py b/plugins/modules/macports.py index 3777b86c2f..3f02eeb411 100644 --- a/plugins/modules/macports.py +++ b/plugins/modules/macports.py @@ -221,7 +221,7 @@ def install_ports(module, port_path, ports, variant, stdout, stderr): def activate_ports(module, port_path, ports, stdout, stderr): - """ Activate a port if it's inactive. """ + """ Activate a port if it is inactive. """ activate_c = 0 @@ -248,7 +248,7 @@ def activate_ports(module, port_path, ports, stdout, stderr): def deactivate_ports(module, port_path, ports, stdout, stderr): - """ Deactivate a port if it's active. """ + """ Deactivate a port if it is active. """ deactivated_c = 0 diff --git a/plugins/modules/manageiq_alerts.py b/plugins/modules/manageiq_alerts.py index 9dd50af846..87fafcf10b 100644 --- a/plugins/modules/manageiq_alerts.py +++ b/plugins/modules/manageiq_alerts.py @@ -151,7 +151,7 @@ class ManageIQAlert(object): self.miq_expression = alert['miq_expression'] if 'exp' in self.miq_expression: # miq_expression is a field that needs a special case, because - # it's returned surrounded by a dict named exp even though we don't + # it is returned surrounded by a dict named exp even though we don't # send it with that dict. self.miq_expression = self.miq_expression['exp'] diff --git a/plugins/modules/memset_zone_domain.py b/plugins/modules/memset_zone_domain.py index ca4b07aaaf..d8e56b4fe6 100644 --- a/plugins/modules/memset_zone_domain.py +++ b/plugins/modules/memset_zone_domain.py @@ -253,7 +253,7 @@ def main(): retvals = create_or_delete_domain(args) # we would need to populate the return values with the API's response - # in several places so it's easier to do it at the end instead. + # in several places so it is easier to do it at the end instead. if not retvals['failed']: if args['state'] == 'present' and not module.check_mode: payload = dict() diff --git a/plugins/modules/monit.py b/plugins/modules/monit.py index f97cd12e64..aac495fa70 100644 --- a/plugins/modules/monit.py +++ b/plugins/modules/monit.py @@ -216,7 +216,7 @@ class Monit(object): return running_status def wait_for_monit_to_stop_pending(self, current_status=None): - """Fails this run if there is no status or it's pending/initializing for timeout""" + """Fails this run if there is no status or it is pending/initializing for timeout""" timeout_time = time.time() + self.timeout if not current_status: diff --git a/plugins/modules/oci_vcn.py b/plugins/modules/oci_vcn.py index aba8b0e73e..9503698fd7 100644 --- a/plugins/modules/oci_vcn.py +++ b/plugins/modules/oci_vcn.py @@ -29,12 +29,12 @@ options: with O(vcn_id). type: str display_name: - description: A user-friendly name. Does not have to be unique, and it's changeable. + description: A user-friendly name. Does not have to be unique, and it is changeable. type: str aliases: ['name'] dns_label: description: A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain - name (FQDN) for each VNIC within this subnet (for example, V(bminstance-1.subnet123.vcn1.oraclevcn.com)). Not required to be unique, but it's + name (FQDN) for each VNIC within this subnet (for example, V(bminstance-1.subnet123.vcn1.oraclevcn.com)). Not required to be unique, but it is a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. type: str diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index 9c1084866e..10e4b324ee 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -90,7 +90,7 @@ options: description: - A dictionary of key/value attributes to add to new instances, or for setting C(state) of instances with these attributes. - Keys are case insensitive and OpenNebula automatically converts them to upper case. - - Be aware V(NAME) is a special attribute which sets the name of the VM when it's deployed. + - Be aware V(NAME) is a special attribute which sets the name of the VM when it is deployed. - C(#) character(s) can be appended to the C(NAME) and the module will automatically add indexes to the names of VMs. - 'For example: V(NAME: foo-###) would create VMs with names V(foo-000), V(foo-001),...' - When used with O(count_attributes) and O(exact_count) the module will match the base name without the index part. diff --git a/plugins/modules/oneandone_server.py b/plugins/modules/oneandone_server.py index e47da5baba..e24ed4f69d 100644 --- a/plugins/modules/oneandone_server.py +++ b/plugins/modules/oneandone_server.py @@ -517,7 +517,7 @@ def startstop_server(module, oneandone_conn): # Resolve server server = get_server(oneandone_conn, server_id, True) if server: - # Attempt to change the server state, only if it's not already there + # Attempt to change the server state, only if it is not already there # or on its way. try: if state == 'stopped' and server['status']['state'] == 'POWERED_ON': diff --git a/plugins/modules/openbsd_pkg.py b/plugins/modules/openbsd_pkg.py index 394a5b75e2..385fdb9870 100644 --- a/plugins/modules/openbsd_pkg.py +++ b/plugins/modules/openbsd_pkg.py @@ -119,7 +119,7 @@ EXAMPLES = r""" name: '*' state: latest -- name: Purge a package and it's configuration files +- name: Purge a package and its configuration files community.general.openbsd_pkg: name: mpd clean: true diff --git a/plugins/modules/ovh_ip_failover.py b/plugins/modules/ovh_ip_failover.py index d69c176fbd..4d6071cc18 100644 --- a/plugins/modules/ovh_ip_failover.py +++ b/plugins/modules/ovh_ip_failover.py @@ -158,7 +158,7 @@ def waitForTaskDone(client, name, taskId, timeout): task = client.get('/ip/{0}/task/{1}'.format(quote_plus(name), taskId)) if task['status'] == 'done': return True - time.sleep(5) # Delay for 5 sec because it's long to wait completion, do not harass the API + time.sleep(5) # Delay for 5 sec to not harass the API currentTimeout -= 5 if currentTimeout < 0: return False diff --git a/plugins/modules/packet_device.py b/plugins/modules/packet_device.py index 13dbbb9ff3..59851ea74b 100644 --- a/plugins/modules/packet_device.py +++ b/plugins/modules/packet_device.py @@ -173,7 +173,7 @@ EXAMPLES = r""" plan: baremetal_0 facility: sjc1 -# Create the same device and wait until it is in state "active", (when it's +# Create the same device and wait until it is in state "active", (when it is # ready for other API operations). Fail if the device is not "active" in # 10 minutes. diff --git a/plugins/modules/packet_ip_subnet.py b/plugins/modules/packet_ip_subnet.py index c2c9fcead4..04d4aede11 100644 --- a/plugins/modules/packet_ip_subnet.py +++ b/plugins/modules/packet_ip_subnet.py @@ -78,7 +78,7 @@ options: - With O(state=present), you must specify either O(hostname) or O(device_id). Subnet with given CIDR will then be assigned to the specified device. - With O(state=absent), you can specify either O(hostname) or O(device_id). The subnet will be removed from specified devices. - - If you leave both O(hostname) and O(device_id) empty, the subnet will be removed from any device it's assigned to. + - If you leave both O(hostname) and O(device_id) empty, the subnet will be removed from any device it is assigned to. choices: ['present', 'absent'] default: 'present' type: str diff --git a/plugins/modules/pear.py b/plugins/modules/pear.py index ba8f5f9ca2..e8f3d96305 100644 --- a/plugins/modules/pear.py +++ b/plugins/modules/pear.py @@ -224,7 +224,7 @@ def install_packages(module, state, packages, prompts): # Preparing prompts answer according to item type tmp_prompts = [] for _item in prompts: - # If the current item is a dict then we expect it's key to be the prompt regex and it's value to be the answer + # If the current item is a dict then we expect its key to be the prompt regex and its value to be the answer # We also expect here that the dict only has ONE key and the first key will be taken if isinstance(_item, dict): key = list(_item.keys())[0] diff --git a/plugins/modules/pkgin.py b/plugins/modules/pkgin.py index 76423f8135..51071aefc7 100644 --- a/plugins/modules/pkgin.py +++ b/plugins/modules/pkgin.py @@ -50,7 +50,7 @@ options: type: str update_cache: description: - - Update repository database. Can be run with other steps or on it's own. + - Update repository database. Can be run with other steps or on its own. type: bool default: false upgrade: diff --git a/plugins/modules/pkgutil.py b/plugins/modules/pkgutil.py index ce85308651..8efc294d7a 100644 --- a/plugins/modules/pkgutil.py +++ b/plugins/modules/pkgutil.py @@ -55,7 +55,7 @@ options: choices: [absent, installed, latest, present, removed] update_catalog: description: - - If you always want to refresh your catalog from the mirror, even when it's not stale, set this to V(true). + - If you always want to refresh your catalog from the mirror, even when it is not stale, set this to V(true). type: bool default: false force: diff --git a/plugins/modules/pmem.py b/plugins/modules/pmem.py index 4e6edfeb06..fe414122ef 100644 --- a/plugins/modules/pmem.py +++ b/plugins/modules/pmem.py @@ -534,7 +534,7 @@ class PersistentMemory(object): out = xmltodict.parse(goal, dict_constructor=dict)['ConfigGoalList']['ConfigGoal'] for entry in out: - # Probably it's a bug of ipmctl to show the socket goal + # Probably it is a bug of ipmctl to show the socket goal # which isn't specified by the -socket option. # Anyway, filter the noise out here: if skt and skt['id'] != int(entry['SocketID'], 16): diff --git a/plugins/modules/proxmox.py b/plugins/modules/proxmox.py index 3925eec090..8ca3f60ba4 100644 --- a/plugins/modules/proxmox.py +++ b/plugins/modules/proxmox.py @@ -817,7 +817,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): if new_value not in current_values: update_config = True break - # if it's not a list (or string) just compare the current value + # if it is not a list (or string) just compare the current value else: # some types don't match with the API, so forcing to string for comparison if str(value) != str(current_config[arg]): diff --git a/plugins/modules/proxmox_kvm.py b/plugins/modules/proxmox_kvm.py index d495b08694..4eff348e68 100644 --- a/plugins/modules/proxmox_kvm.py +++ b/plugins/modules/proxmox_kvm.py @@ -1053,7 +1053,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible): if ('bios' not in kwargs) or ('ovmf' != kwargs['bios']): self.module.fail_json(msg='efidisk0 cannot be used if bios is not set to ovmf. ') - # Flatten efidisk0 option to a string so that it's a string which is what Proxmoxer and the API expect + # Flatten efidisk0 option to a string so that it is a string which is what Proxmoxer and the API expect if 'efidisk0' in kwargs: efidisk0_str = '' # Regexp to catch underscores in keys name, to replace them after by hyphens @@ -1068,7 +1068,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible): if 'storage' != k]) kwargs['efidisk0'] = efidisk0_str - # Flatten tpmstate0 option to a string so that it's a string which is what Proxmoxer and the API expect + # Flatten tpmstate0 option to a string so that it is a string which is what Proxmoxer and the API expect if 'tpmstate0' in kwargs: kwargs['tpmstate0'] = '{storage}:1,version=v{version}'.format( storage=kwargs['tpmstate0'].get('storage'), diff --git a/plugins/modules/puppet.py b/plugins/modules/puppet.py index cf4cfae47c..332ab17d17 100644 --- a/plugins/modules/puppet.py +++ b/plugins/modules/puppet.py @@ -275,7 +275,7 @@ def main(): # success module.exit_json(rc=rc, changed=False, stdout=stdout, stderr=stderr) elif rc == 1: - # rc==1 could be because it's disabled + # rc==1 could be because it is disabled # rc==1 could also mean there was a compilation failure disabled = "administratively disabled" in stdout if disabled: diff --git a/plugins/modules/rundeck_acl_policy.py b/plugins/modules/rundeck_acl_policy.py index 29b31a6642..aa22e6e6ea 100644 --- a/plugins/modules/rundeck_acl_policy.py +++ b/plugins/modules/rundeck_acl_policy.py @@ -43,7 +43,7 @@ options: type: str description: - Sets the project which receive the ACL policy. - - If unset, it's a system ACL policy. + - If unset, it is a system ACL policy. policy: type: str description: @@ -155,7 +155,7 @@ class RundeckACLManager: if info["status"] == 201: self.module.exit_json(changed=True, before={}, after=self.get_acl()) elif info["status"] == 400: - self.module.fail_json(msg="Unable to validate acl %s. Please ensure it's a valid ACL" % + self.module.fail_json(msg="Unable to validate acl %s. Please ensure it is a valid ACL" % self.module.params["name"]) elif info["status"] == 409: self.module.fail_json(msg="ACL %s already exists" % self.module.params["name"]) @@ -179,7 +179,7 @@ class RundeckACLManager: if info["status"] == 200: self.module.exit_json(changed=True, before=facts, after=self.get_acl()) elif info["status"] == 400: - self.module.fail_json(msg="Unable to validate acl %s. Please ensure it's a valid ACL" % + self.module.fail_json(msg="Unable to validate acl %s. Please ensure it is a valid ACL" % self.module.params["name"]) elif info["status"] == 404: self.module.fail_json(msg="ACL %s doesn't exists. Cannot update." % self.module.params["name"]) diff --git a/plugins/modules/sensu_client.py b/plugins/modules/sensu_client.py index a8122c4838..bf5d2a7e26 100644 --- a/plugins/modules/sensu_client.py +++ b/plugins/modules/sensu_client.py @@ -209,7 +209,7 @@ def main(): module.fail_json( msg=msg.format(path=path, exception=str(e))) else: - # Idempotency: it's okay if the file doesn't exist + # Idempotency: it is okay if the file doesn't exist msg = '{path} already does not exist'.format(path=path) module.exit_json(msg=msg) @@ -228,7 +228,7 @@ def main(): try: current_config = json.load(open(path, 'r')) except (IOError, ValueError): - # File either doesn't exist or it's invalid JSON + # File either doesn't exist or it is invalid JSON pass if current_config is not None and current_config == config: diff --git a/plugins/modules/sensu_handler.py b/plugins/modules/sensu_handler.py index 8b649d445c..fa952a7b41 100644 --- a/plugins/modules/sensu_handler.py +++ b/plugins/modules/sensu_handler.py @@ -217,7 +217,7 @@ def main(): module.fail_json( msg=msg.format(path=path, exception=str(e))) else: - # Idempotency: it's okay if the file doesn't exist + # Idempotency: it is okay if the file doesn't exist msg = '{path} already does not exist'.format(path=path) module.exit_json(msg=msg) @@ -236,7 +236,7 @@ def main(): try: current_config = json.load(open(path, 'r')) except (IOError, ValueError): - # File either doesn't exist or it's invalid JSON + # File either doesn't exist or it is invalid JSON pass if current_config is not None and current_config == config: diff --git a/plugins/modules/sl_vm.py b/plugins/modules/sl_vm.py index 3216fded8b..ea48340f1c 100644 --- a/plugins/modules/sl_vm.py +++ b/plugins/modules/sl_vm.py @@ -138,11 +138,11 @@ options: type: int public_vlan: description: - - VLAN by its Id to be assigned to the public NIC. + - VLAN by its ID to be assigned to the public NIC. type: str private_vlan: description: - - VLAN by its Id to be assigned to the private NIC. + - VLAN by its ID to be assigned to the private NIC. type: str ssh_keys: description: diff --git a/plugins/modules/solaris_zone.py b/plugins/modules/solaris_zone.py index 9f8f774cbe..6aa8608be4 100644 --- a/plugins/modules/solaris_zone.py +++ b/plugins/modules/solaris_zone.py @@ -34,7 +34,7 @@ options: - V(started), synonym for V(running). - V(stopped), shutdown a zone. - V(absent), destroy the zone. - - V(configured), configure the ready so that it's to be attached. + - V(configured), configure the ready so that it is to be attached. - V(attached), attach a zone, but do not boot it. - V(detached), shutdown and detach a zone. type: str diff --git a/plugins/modules/timezone.py b/plugins/modules/timezone.py index 78df0cd45f..12a0addd33 100644 --- a/plugins/modules/timezone.py +++ b/plugins/modules/timezone.py @@ -333,7 +333,7 @@ class NosystemdTimezone(Timezone): adjtime='/etc/adjtime' ) - # It's fine if all tree config files don't exist + # It is fine if all tree config files don't exist allow_no_file = dict( name=True, hwclock=True, @@ -545,7 +545,7 @@ class NosystemdTimezone(Timezone): # to set, we need to return the TZ which the symlink points to. if os.path.exists('/etc/localtime'): # We use readlink() because on some distros zone files are symlinks - # to other zone files, so it's hard to get which TZ is actually set + # to other zone files, so it is hard to get which TZ is actually set # if we follow the symlink. path = os.readlink('/etc/localtime') # most linuxes has it in /usr/share/zoneinfo diff --git a/plugins/modules/udm_share.py b/plugins/modules/udm_share.py index 3489607b09..689181d83e 100644 --- a/plugins/modules/udm_share.py +++ b/plugins/modules/udm_share.py @@ -125,7 +125,7 @@ options: sambaCustomSettings: default: [] description: - - Option name in smb.conf and its value. + - Option name in C(smb.conf) and its value. type: list elements: dict aliases: [samba_custom_settings] diff --git a/plugins/modules/vdo.py b/plugins/modules/vdo.py index 5ce47ac2d7..55706da56a 100644 --- a/plugins/modules/vdo.py +++ b/plugins/modules/vdo.py @@ -534,7 +534,7 @@ def run_module(): # Check for differences between the playbook parameters and the # current parameters. This will need a comparison function; # since AnsibleModule params are all strings, compare them as - # strings (but if it's None; skip). + # strings (but if it is None; skip). for key in currentparams.keys(): if module.params[key] is not None: if str(currentparams[key]) != module.params[key]: diff --git a/plugins/modules/vmadm.py b/plugins/modules/vmadm.py index 304441a97e..4b21ead77e 100644 --- a/plugins/modules/vmadm.py +++ b/plugins/modules/vmadm.py @@ -432,7 +432,7 @@ def get_vm_uuid(module, alias): msg='Could not retrieve UUID of {0}'.format(alias), exception=stderr) # If no VM was found matching the given alias, we get back an empty array. - # That is not an error condition as we might be explicitly checking it's + # That is not an error condition as we might be explicitly checking for its # absence. try: stdout_json = json.loads(stdout) @@ -708,7 +708,7 @@ def main(): result = {'state': state} - # While it's possible to refer to a given VM by it's `alias`, it's easier + # While it is possible to refer to a given VM by its `alias`, it is easier # to operate on VMs by their UUID. So if we're not given a `uuid`, look # it up. if not uuid: @@ -733,12 +733,12 @@ def main(): module.exit_json(**result) # The general flow is as follows: - # - first the current state of the VM is obtained by it's UUID. + # - first the current state of the VM is obtained by its UUID. # - If the state was not found and the desired state is 'deleted', return. # - If the state was not found, it means the VM has to be created. # Subsequently the VM will be set to the desired state (i.e. stopped) - # - Otherwise, it means the VM exists already and we operate on it's - # state (i.e. reboot it.) + # - Otherwise, it means the VM exists already and we operate on its + # state (for example reboot it.) # # In the future it should be possible to query the VM for a particular # property as a valid state (i.e. queried) so the result can be diff --git a/plugins/modules/xml.py b/plugins/modules/xml.py index b06b8051a2..a28e5dcefc 100644 --- a/plugins/modules/xml.py +++ b/plugins/modules/xml.py @@ -432,7 +432,7 @@ def is_attribute(tree, xpath, namespaces): An xpath attribute search will only match one item""" - # lxml 5.1.1 removed etree._ElementStringResult, so we can no longer simply assume it's there + # lxml 5.1.1 removed etree._ElementStringResult, so we can no longer simply assume it is there # (https://github.com/lxml/lxml/commit/eba79343d0e7ad1ce40169f60460cdd4caa29eb3) ElementStringResult = getattr(etree, '_ElementStringResult', None)