diff --git a/changelogs/fragments/11029-extra-whitespace.yml b/changelogs/fragments/11029-extra-whitespace.yml new file mode 100644 index 0000000000..0d2f54f5d3 --- /dev/null +++ b/changelogs/fragments/11029-extra-whitespace.yml @@ -0,0 +1,5 @@ +minor_changes: + - infinity - consolidate double and triple whitespaces (https://github.com/ansible-collections/community.general/pull/11029). + - ipa_otptoken - consolidate double and triple whitespaces (https://github.com/ansible-collections/community.general/pull/11029). + - rhevm - consolidate double and triple whitespaces (https://github.com/ansible-collections/community.general/pull/11029). + - slack - consolidate double and triple whitespaces (https://github.com/ansible-collections/community.general/pull/11029). diff --git a/plugins/modules/infinity.py b/plugins/modules/infinity.py index c3c63bb599..23f3b49ab9 100644 --- a/plugins/modules/infinity.py +++ b/plugins/modules/infinity.py @@ -210,7 +210,7 @@ class Infinity: return the details of a given with given network_id or name """ if network_name is None and network_id is None: - self.module.exit_json(msg="You must specify one of the options 'network_name' or 'network_id'.") + self.module.exit_json(msg="You must specify one of the options 'network_name' or 'network_id'.") method = "get" resource_url = "" params = {} @@ -287,12 +287,12 @@ class Infinity: resource_url = "" response = None if ip_address is None or network_id is None: - self.module.exit_json(msg="You must specify those two options: 'network_id' and 'ip_address'.") + self.module.exit_json(msg="You must specify those two options: 'network_id' and 'ip_address'.") resource_url = f"networks/{network_id}/children" response = self._get_api_call_ansible_handler(method, resource_url) if not response: - self.module.exit_json(msg=f"There is an error in release ip {ip_address} from network {network_id}.") + self.module.exit_json(msg=f"There is an error in release ip {ip_address} from network {network_id}.") ip_list = json.loads(response) ip_idlist = [] @@ -407,7 +407,7 @@ class Infinity: response = self._get_api_call_ansible_handler(method, resource_url) if not response: self.module.exit_json( - msg=f" there is an error in releasing network {network_id} from network {released_network_name}." + msg=f"There is an error in releasing network {network_id} from network {released_network_name}." ) if response: response = json.loads(response) @@ -422,7 +422,7 @@ class Infinity: response = self._get_api_call_ansible_handler(method, resource_url, stat_codes=[204]) else: self.module.exit_json( - msg=f" When release network , could not find the network {released_network_name} from the given superent {network_id} " + msg=f"When release network, could not find the network {released_network_name} from the given superent {network_id} " ) return response @@ -448,7 +448,7 @@ class Infinity: response = None if network_name is None or network_address is None or network_size is None: self.module.exit_json( - msg="You must specify those options 'network_name', 'network_address' and 'network_size'" + msg="You must specify those options 'network_name', 'network_address' and 'network_size'" ) if not network_family: diff --git a/plugins/modules/ipa_otptoken.py b/plugins/modules/ipa_otptoken.py index 45d12a57f4..efd4e13dbb 100644 --- a/plugins/modules/ipa_otptoken.py +++ b/plugins/modules/ipa_otptoken.py @@ -350,7 +350,7 @@ def validate_modifications(ansible_to_ipa, module, ipa_otptoken, module_otptoken else: if len(ipa_otptoken[ansible_to_ipa[parameter]]) != 1: module.fail_json( - msg="Invariant fail: Return value from IPA is not a list of length 1. Please open a bug report for the module." + msg="Invariant fail: Return value from IPA is not a list of length 1. Please open a bug report for the module." ) if parameter == "secretkey": # We stored the secret key in base32 since we had assumed that would need to diff --git a/plugins/modules/listen_ports_facts.py b/plugins/modules/listen_ports_facts.py index c0631903ae..d4967f037c 100644 --- a/plugins/modules/listen_ports_facts.py +++ b/plugins/modules/listen_ports_facts.py @@ -59,7 +59,7 @@ EXAMPLES = r""" - name: List TCP ports ansible.builtin.debug: - msg: "{{ ansible_facts.tcp_listen | map(attribute='port') | sort | list }}" + msg: "{{ ansible_facts.tcp_listen | map(attribute='port') | sort | list }}" - name: List UDP ports ansible.builtin.debug: diff --git a/plugins/modules/ovh_ip_failover.py b/plugins/modules/ovh_ip_failover.py index b9e9597569..afd470f497 100644 --- a/plugins/modules/ovh_ip_failover.py +++ b/plugins/modules/ovh_ip_failover.py @@ -18,7 +18,7 @@ notes: - Uses the Python OVH API U(https://github.com/ovh/python-ovh). You have to create an application (a key and secret) with a consumer key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/). requirements: - - ovh >= 0.4.8 + - ovh >= 0.4.8 extends_documentation_fragment: - community.general.attributes attributes: diff --git a/plugins/modules/rhevm.py b/plugins/modules/rhevm.py index 6c7aa39e78..a2113b168d 100644 --- a/plugins/modules/rhevm.py +++ b/plugins/modules/rhevm.py @@ -452,7 +452,7 @@ class RHEVConn: else: attempt += 1 time.sleep(2) - setMsg(f"The disk {diskname} is ready.") + setMsg(f"The disk {diskname} is ready.") except Exception as e: setFailed() setMsg(f"Error getting the state of {diskname}.") @@ -488,7 +488,7 @@ class RHEVConn: else: attempt += 1 time.sleep(2) - setMsg(f"The iface {nicname} is ready.") + setMsg(f"The iface {nicname} is ready.") except Exception as e: setFailed() setMsg(f"Error getting the state of {nicname}.") @@ -739,7 +739,7 @@ class RHEVConn: ), ) except Exception as e: - setMsg(f"Failed to create the bond for {iface['name']}") + setMsg(f"Failed to create the bond for {iface['name']}") setFailed() setMsg(str(e)) return False diff --git a/plugins/modules/slack.py b/plugins/modules/slack.py index 78eb6c4f84..f417fb99ef 100644 --- a/plugins/modules/slack.py +++ b/plugins/modules/slack.py @@ -431,7 +431,7 @@ def do_notify_slack(module, domain, token, payload): else: if not domain: module.fail_json( - msg="Slack has updated its webhook API. You need to specify a token of the form " + msg="Slack has updated its webhook API. You need to specify a token of the form " "XXXX/YYYY/ZZZZ in your playbook" ) slack_uri = OLD_SLACK_INCOMING_WEBHOOK % (domain, token) diff --git a/plugins/modules/zypper_repository_info.py b/plugins/modules/zypper_repository_info.py index 49348f7571..f3429dba85 100644 --- a/plugins/modules/zypper_repository_info.py +++ b/plugins/modules/zypper_repository_info.py @@ -20,7 +20,7 @@ extends_documentation_fragment: - community.general.attributes.info_module requirements: - - "zypper >= 1.0 (included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0)" + - "zypper >= 1.0 (included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0)" - python-xml notes: - For info about packages, use the module M(ansible.builtin.package_facts).