mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +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
|
|
@ -521,8 +521,7 @@ def main():
|
|||
|
||||
if not module.params.get('auth_token'):
|
||||
module.fail_json(
|
||||
msg='The "auth_token" parameter or ' +
|
||||
'ONEANDONE_AUTH_TOKEN environment variable is required.')
|
||||
msg='The "auth_token" parameter or ONEANDONE_AUTH_TOKEN environment variable is required.')
|
||||
|
||||
if not module.params.get('api_url'):
|
||||
oneandone_conn = oneandone.client.OneAndOneService(
|
||||
|
|
@ -555,7 +554,7 @@ def main():
|
|||
for param in ('name', 'rules'):
|
||||
if not module.params.get(param):
|
||||
module.fail_json(
|
||||
msg="%s parameter is required for new firewall policies." % param)
|
||||
msg=f"{param} parameter is required for new firewall policies.")
|
||||
try:
|
||||
(changed, firewall_policy) = create_firewall_policy(module, oneandone_conn)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue