diff --git a/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py b/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py index 7d6ad86cd8..15f315a5b7 100755 --- a/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py +++ b/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py @@ -47,6 +47,12 @@ options: description: - The password to authenticate to the HP iLO interface. default: admin + 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: @@ -158,6 +164,7 @@ def main(): host = dict(required=True, type='str'), login = dict(default='Administrator', type='str'), password = dict(default='admin', type='str', no_log=True), + ssl_version = dict(default='TLSv1', choices=['SSLv3', 'SSLv23', 'TLSv1', 'TLSv1_1', 'TLSv1_2']), ), supports_check_mode=True, ) @@ -168,8 +175,9 @@ def main(): host = module.params['host'] login = module.params['login'] password = module.params['password'] + 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) facts = { 'module_hw': True,