1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-27 14:08:53 +00:00

modules h*: use f-strings (#10959)

* modules h*: use f-strings

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-25 11:59:12 +13:00 committed by GitHub
parent b67e7c83cf
commit f9b4abf930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 242 additions and 402 deletions

View file

@ -158,7 +158,7 @@ def main():
state = module.params['state']
force = module.params['force']
idempotent_boot_once = module.params['idempotent_boot_once']
ssl_version = getattr(hpilo.ssl, 'PROTOCOL_' + module.params.get('ssl_version').upper().replace('V', 'v'))
ssl_version = getattr(hpilo.ssl, f"PROTOCOL_{module.params.get('ssl_version').upper().replace('V', 'v')}")
ilo = hpilo.Ilo(host, login=login, password=password, ssl_version=ssl_version)
changed = False
@ -201,7 +201,7 @@ def main():
# version='11.0.0',
# collection_name='community.general'
# )
module.fail_json(msg='HP iLO (%s) reports that the server is already powered on !' % host)
module.fail_json(msg=f'HP iLO ({host}) reports that the server is already powered on !')
elif not force and idempotent_boot_once:
pass
elif force: