mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-03 08:52:55 +00:00
modules [no]*: use f-strings (#10973)
* modules [no]*: use f-strings * add changelog frag
This commit is contained in:
parent
50846b7560
commit
749c06cd01
44 changed files with 399 additions and 412 deletions
|
|
@ -514,7 +514,7 @@ def create_load_balancer(module, oneandone_conn):
|
|||
datacenter_id = get_datacenter(oneandone_conn, datacenter)
|
||||
if datacenter_id is None:
|
||||
module.fail_json(
|
||||
msg='datacenter %s not found.' % datacenter)
|
||||
msg=f'datacenter {datacenter} not found.')
|
||||
|
||||
for rule in rules:
|
||||
load_balancer_rule = oneandone.client.LoadBalancerRule(
|
||||
|
|
@ -660,7 +660,7 @@ def main():
|
|||
'persistence_time', 'method', 'rules'):
|
||||
if not module.params.get(param):
|
||||
module.fail_json(
|
||||
msg="%s parameter is required for new load balancers." % param)
|
||||
msg=f"{param} parameter is required for new load balancers.")
|
||||
try:
|
||||
(changed, load_balancer) = create_load_balancer(module, oneandone_conn)
|
||||
except Exception as ex:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue