mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 05:02:46 +00:00
modules s[f-z]*: use f-strings (#10977)
* modules s[f-z]*: use f-strings * add changelog frag
This commit is contained in:
parent
73452acf84
commit
af246f8de3
29 changed files with 274 additions and 273 deletions
|
|
@ -895,7 +895,7 @@ def handle_elastigroup(client, module):
|
|||
if should_create is True:
|
||||
if state == 'present':
|
||||
eg = expand_elastigroup(module, is_update=False)
|
||||
module.debug(str(" [INFO] " + message + "\n"))
|
||||
module.debug(f" [INFO] {message}\n")
|
||||
group = client.create_elastigroup(group=eg)
|
||||
group_id = group['id']
|
||||
message = 'Created group Successfully.'
|
||||
|
|
@ -923,7 +923,7 @@ def handle_elastigroup(client, module):
|
|||
message = 'Updated and started rolling the group successfully.'
|
||||
|
||||
except SpotinstClientException as exc:
|
||||
message = 'Updated group successfully, but failed to perform roll. Error:' + str(exc)
|
||||
message = f"Updated group successfully, but failed to perform roll. Error:{exc}"
|
||||
has_changed = True
|
||||
|
||||
elif state == 'absent':
|
||||
|
|
@ -933,7 +933,7 @@ def handle_elastigroup(client, module):
|
|||
if "GROUP_DOESNT_EXIST" in exc.message:
|
||||
pass
|
||||
else:
|
||||
module.fail_json(msg="Error while attempting to delete group : " + exc.message)
|
||||
module.fail_json(msg=f"Error while attempting to delete group : {exc.message}")
|
||||
|
||||
message = 'Deleted group successfully.'
|
||||
has_changed = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue