mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
[PR #11029/3c42ec73 backport][stable-12] remove extraneous whitespaces (#11035)
remove extraneous whitespaces (#11029)
* remove extraneous whitespaces
* ruff format
* add changelog frag
(cherry picked from commit 3c42ec730d)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
c8ad571e27
commit
855a8504d5
8 changed files with 19 additions and 14 deletions
5
changelogs/fragments/11029-extra-whitespace.yml
Normal file
5
changelogs/fragments/11029-extra-whitespace.yml
Normal file
|
|
@ -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).
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue