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:
parent
b67e7c83cf
commit
f9b4abf930
24 changed files with 242 additions and 402 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue