1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update hpilo_boot.py (#24499)

* Update hpilo_boot.py

Add option to change the ssl version to connect to the remotr iLO

* Update hpilo_boot.py

added version_added

* Update hpilo_boot.py

fix lib/ansible/modules/remote_management/hpilo/hpilo_boot.py:83:25: W291 trailing whitespace

* Update hpilo_boot.py

nitpicking fixes :)
This commit is contained in:
William Leemans 2017-07-13 19:48:03 +02:00 committed by ansibot
parent ae3a6cd931
commit 267d0fb400

View file

@ -75,6 +75,12 @@ options:
- As a safeguard, without force, hpilo_boot will refuse to reboot a server that is already running.
default: no
choices: [ "yes", "no" ]
ssl_version:
description:
- Change the ssl_version used.
default: TLSv1
choices: [ "SSLv3", "SSLv23", "TLSv1", "TLSv1_1", "TLSv1_2" ]
version_added: '2.4'
requirements:
- hpilo
notes:
@ -134,6 +140,7 @@ def main():
image = dict(default=None, type='str'),
state = dict(default='boot_once', type='str', choices=['boot_always', 'boot_once', 'connect', 'disconnect', 'no_boot', 'poweroff']),
force = dict(default=False, type='bool'),
ssl_version = dict(default='TLSv1', choices=['SSLv3', 'SSLv23', 'TLSv1', 'TLSv1_1', 'TLSv1_2']),
)
)
@ -147,8 +154,9 @@ def main():
image = module.params['image']
state = module.params['state']
force = module.params['force']
ssl_version = getattr(hpilo.ssl, 'PROTOCOL_' + module.params.get('ssl_version').upper().replace('V','v'))
ilo = hpilo.Ilo(host, login=login, password=password)
ilo = hpilo.Ilo(host, login=login, password=password, ssl_version=ssl_version)
changed = False
status = {}
power_status = 'UNKNOWN'