From 2c8246d651e0ee0c9f9eac6b408933bf10f8e52c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 28 Dec 2024 14:12:22 +0100 Subject: [PATCH 1/3] Fix its vs. it's. --- 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 | 2 +- plugins/module_utils/identity/keycloak/keycloak.py | 6 +++--- .../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 | 8 ++++---- plugins/modules/xml.py | 2 +- 60 files changed, 85 insertions(+), 85 deletions(-) diff --git a/plugins/become/pfexec.py b/plugins/become/pfexec.py index d3b98a6317e..8794b6173c0 100644 --- a/plugins/become/pfexec.py +++ b/plugins/become/pfexec.py @@ -15,7 +15,7 @@ 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 e0419644efa..50d301000d9 100644 --- a/plugins/callback/dense.py +++ b/plugins/callback/dense.py @@ -243,7 +243,7 @@ def _clean_results(self, result): 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 25861096697..a29c6f5fce1 100644 --- a/plugins/connection/chroot.py +++ b/plugins/connection/chroot.py @@ -126,7 +126,7 @@ def __init__(self, play_context, new_stdin, *args, **kwargs): # 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 @@ def _prefix_login_path(remote_path): 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 1ebe5b26efd..c5fd7666055 100644 --- a/plugins/connection/jail.py +++ b/plugins/connection/jail.py @@ -144,7 +144,7 @@ def _prefix_login_path(remote_path): 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 77d85ad0ee7..ac26f12e782 100644 --- a/plugins/connection/zone.py +++ b/plugins/connection/zone.py @@ -140,7 +140,7 @@ def _prefix_login_path(self, remote_path): 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 ef88dae18c0..d439243c9bc 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -20,7 +20,7 @@ - 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 a5f53b8b142..3ebbff3d29a 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -22,7 +22,7 @@ - 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 e4a39df3d73..e2fa2efff3e 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -25,7 +25,7 @@ - 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 @@ -404,7 +404,7 @@ def _get_agent_network_interfaces(self, node, vmid, vmtype): 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 e6f401ca86a..4241ba2ab2b 100644 --- a/plugins/inventory/virtualbox.py +++ b/plugins/inventory/virtualbox.py @@ -257,7 +257,7 @@ def _handle_group_string(self, vboxmanage_group, current_host, cacheable_results 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 0071417a0d6..5365f2ca997 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -78,7 +78,7 @@ def _do_flatten(self, terms, variables): 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 a35d0b91cff..f415ccdfb56 100644 --- a/plugins/module_utils/_filelock.py +++ b/plugins/module_utils/_filelock.py @@ -46,7 +46,7 @@ def set_lock(self, path, tmpdir, lock_timeout=None): ''' 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 + Please note that currently file locking only works when it is executed by the same user, I.E single user scenarios :kw path: Path (file) to lock diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 15603331b02..9d5a587b43e 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -1161,7 +1161,7 @@ def delete_clientscope(self, name=None, cid=None, realm="master"): 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 + # 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 @@ def delete_group(self, name=None, groupid=None, realm="master"): 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 @@ def delete_client_role(self, name, clientid, realm="master"): 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 85caa8e16b6..366322c9df1 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 253395ea93c..6065708b7c2 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -119,7 +119,7 @@ def _check_request_payload(self, req_pyld, cur_pyld, uri): # 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 @@ def manage_power(self, command, resource_uri, action_name, wait=False, 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 @@ def manage_power(self, command, resource_uri, action_name, wait=False, while elapsed_time <= wait_timeout: status = self.check_service_availability() if status['available']: - # It's available; we're done + # It is available; we're done break time.sleep(5) elapsed_time = time.time() - start_time @@ -1813,7 +1813,7 @@ def _operation_results(self, response, data, handle=None): 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 18c56605b92..088c15e4f61 100644 --- a/plugins/modules/capabilities.py +++ b/plugins/modules/capabilities.py @@ -92,7 +92,7 @@ def run(self): 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 156fc6dee6c..34b12edcc2d 100644 --- a/plugins/modules/clc_server.py +++ b/plugins/modules/clc_server.py @@ -804,7 +804,7 @@ def _validate_types(module): @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 742d50c3f26..3e9104b575c 100644 --- a/plugins/modules/dnsmadeeasy.py +++ b/plugins/modules/dnsmadeeasy.py @@ -486,7 +486,7 @@ def getRecords(self): 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 d74d8ba0396..5783e2b314d 100644 --- a/plugins/modules/dpkg_divert.py +++ b/plugins/modules/dpkg_divert.py @@ -19,7 +19,7 @@ - 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 44fbf1ae02d..8b9503e325f 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 fd539ba54da..92e10f87257 100644 --- a/plugins/modules/hg.py +++ b/plugins/modules/hg.py @@ -205,7 +205,7 @@ def at_revision(self): 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 cdd6bafb6df..27d2c79034b 100644 --- a/plugins/modules/influxdb_retention_policy.py +++ b/plugins/modules/influxdb_retention_policy.py @@ -59,7 +59,7 @@ 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 none, 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 e878d10d1fb..23bfd787906 100644 --- a/plugins/modules/interfaces_file.py +++ b/plugins/modules/interfaces_file.py @@ -46,7 +46,7 @@ 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 039cf3cb707..47d50972bd2 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 a205ecc789b..8746c2d6173 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 40aa4169680..f406ec3b4bc 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 0f6064eeca1..bd30f9daa77 100644 --- a/plugins/modules/jenkins_script.py +++ b/plugins/modules/jenkins_script.py @@ -61,8 +61,8 @@ 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 1b47542bb35..58878c069dc 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 7c49510fd61..be8b75fc854 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -159,7 +159,7 @@ 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 1338c8154b7..294a5d11822 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 3d5b4d6413c..953d3518a68 100644 --- a/plugins/modules/kibana_plugin.py +++ b/plugins/modules/kibana_plugin.py @@ -39,7 +39,7 @@ 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 f6f8abc0209..01eca7b49c6 100644 --- a/plugins/modules/lvg.py +++ b/plugins/modules/lvg.py @@ -61,7 +61,7 @@ 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 9b44c4fc899..7683fbfa4e9 100644 --- a/plugins/modules/lxc_container.py +++ b/plugins/modules/lxc_container.py @@ -255,14 +255,14 @@ 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 @@ def _config(self): """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 3777b86c2fa..3f02eeb4110 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 9dd50af8467..87fafcf10b1 100644 --- a/plugins/modules/manageiq_alerts.py +++ b/plugins/modules/manageiq_alerts.py @@ -151,7 +151,7 @@ def __init__(self, alert): 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 ca4b07aaafe..d8e56b4fe6c 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 f97cd12e64f..aac495fa70b 100644 --- a/plugins/modules/monit.py +++ b/plugins/modules/monit.py @@ -216,7 +216,7 @@ def wait_for_status_change(self, current_status): 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 aba8b0e73e7..9503698fd74 100644 --- a/plugins/modules/oci_vcn.py +++ b/plugins/modules/oci_vcn.py @@ -29,12 +29,12 @@ 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 9c1084866e8..10e4b324eea 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -90,7 +90,7 @@ 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 e47da5babad..e24ed4f69d9 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 394a5b75e27..385fdb9870c 100644 --- a/plugins/modules/openbsd_pkg.py +++ b/plugins/modules/openbsd_pkg.py @@ -119,7 +119,7 @@ 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 d69c176fbd1..d0a699d2053 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 because it is long to wait completion, do 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 13dbbb9ff33..59851ea74bc 100644 --- a/plugins/modules/packet_device.py +++ b/plugins/modules/packet_device.py @@ -173,7 +173,7 @@ 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 c2c9fcead4e..04d4aede118 100644 --- a/plugins/modules/packet_ip_subnet.py +++ b/plugins/modules/packet_ip_subnet.py @@ -78,7 +78,7 @@ - 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 ba8f5f9ca2b..e8f3d963056 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 76423f8135f..51071aefc7f 100644 --- a/plugins/modules/pkgin.py +++ b/plugins/modules/pkgin.py @@ -50,7 +50,7 @@ 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 ce853086515..8efc294d7ab 100644 --- a/plugins/modules/pkgutil.py +++ b/plugins/modules/pkgutil.py @@ -55,7 +55,7 @@ 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 4e6edfeb065..fe414122ef9 100644 --- a/plugins/modules/pmem.py +++ b/plugins/modules/pmem.py @@ -534,7 +534,7 @@ def get_allocation_result(self, goal, skt=None): 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 3925eec0907..8ca3f60ba49 100644 --- a/plugins/modules/proxmox.py +++ b/plugins/modules/proxmox.py @@ -817,7 +817,7 @@ def build_volume( 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 d495b08694c..4eff348e682 100644 --- a/plugins/modules/proxmox_kvm.py +++ b/plugins/modules/proxmox_kvm.py @@ -1053,7 +1053,7 @@ def create_vm(self, vmid, newid, node, name, memory, cpu, cores, sockets, update 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 @@ def create_vm(self, vmid, newid, node, name, memory, cpu, cores, sockets, update 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 cf4cfae47c0..332ab17d17a 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 29b31a6642b..aa22e6e6ead 100644 --- a/plugins/modules/rundeck_acl_policy.py +++ b/plugins/modules/rundeck_acl_policy.py @@ -43,7 +43,7 @@ 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 @@ def create_or_update_acl(self): 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 @@ def create_or_update_acl(self): 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 0de0340f330..000397a91c6 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 bd1014f2dd7..2785b6024d1 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 3216fded8ba..ea48340f1c2 100644 --- a/plugins/modules/sl_vm.py +++ b/plugins/modules/sl_vm.py @@ -138,11 +138,11 @@ 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 9f8f774cbe3..6aa8608be4b 100644 --- a/plugins/modules/solaris_zone.py +++ b/plugins/modules/solaris_zone.py @@ -34,7 +34,7 @@ - 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 78df0cd45fe..12a0addd331 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 @@ def get(self, key, phase): # 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 3489607b09c..689181d83e3 100644 --- a/plugins/modules/udm_share.py +++ b/plugins/modules/udm_share.py @@ -125,7 +125,7 @@ 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 c7df2d234ca..c4980e37922 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 148ca18b86d..5933630195f 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 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,11 +733,11 @@ 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 + # - Otherwise, it means the VM exists already and we operate on its # state (i.e. reboot it.) # # In the future it should be possible to query the VM for a particular diff --git a/plugins/modules/xml.py b/plugins/modules/xml.py index b06b8051a22..a28e5dcefc7 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) From 47179ccf74c09c0dd85e312f301d93263e0362a2 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Dec 2024 01:05:40 +0100 Subject: [PATCH 2/3] Improvements from review. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/module_utils/_filelock.py | 2 +- plugins/module_utils/identity/keycloak/keycloak.py | 2 +- plugins/module_utils/redfish_utils.py | 2 +- plugins/modules/keycloak_userprofile.py | 2 +- plugins/modules/vmadm.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/module_utils/_filelock.py b/plugins/module_utils/_filelock.py index f415ccdfb56..4e782064be4 100644 --- a/plugins/module_utils/_filelock.py +++ b/plugins/module_utils/_filelock.py @@ -47,7 +47,7 @@ def set_lock(self, path, tmpdir, lock_timeout=None): 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 is executed by - the same user, I.E single user scenarios + 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 9d5a587b43e..a9867b9b086 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -1160,7 +1160,7 @@ def delete_clientscope(self, name=None, cid=None, realm="master"): # 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. + # 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: diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 6065708b7c2..f9649ce6d7d 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -1190,7 +1190,7 @@ def manage_power(self, command, resource_uri, action_name, wait=False, while elapsed_time <= wait_timeout: status = self.check_service_availability() if status['available']: - # It is available; we're done + # It is available; we are done break time.sleep(5) elapsed_time = time.time() - start_time diff --git a/plugins/modules/keycloak_userprofile.py b/plugins/modules/keycloak_userprofile.py index 294a5d11822..49b52c4521a 100644 --- a/plugins/modules/keycloak_userprofile.py +++ b/plugins/modules/keycloak_userprofile.py @@ -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 is 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/vmadm.py b/plugins/modules/vmadm.py index 5933630195f..ca11465290d 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 its + # That is not an error condition as we might be explicitly checking for its # absence. try: stdout_json = json.loads(stdout) @@ -738,7 +738,7 @@ def main(): # - 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 its - # state (i.e. reboot it.) + # 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 From e51654960d0886486b33e5848d618526555aa733 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Dec 2024 13:00:09 +0100 Subject: [PATCH 3/3] Improve formulations. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/modules/influxdb_retention_policy.py | 2 +- plugins/modules/ovh_ip_failover.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/influxdb_retention_policy.py b/plugins/modules/influxdb_retention_policy.py index 27d2c79034b..332050fb1c1 100644 --- a/plugins/modules/influxdb_retention_policy.py +++ b/plugins/modules/influxdb_retention_policy.py @@ -59,7 +59,7 @@ 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 is 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/ovh_ip_failover.py b/plugins/modules/ovh_ip_failover.py index d0a699d2053..4d6071cc187 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 is 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