fixes issue with ssl protocols ordering (#58177)
This commit is contained in:
parent
cee3d539cb
commit
3531bf3148
2 changed files with 7 additions and 7 deletions
|
@ -27,7 +27,7 @@ options:
|
|||
range for other systems that can communicate with this system.
|
||||
- To specify all addresses, use the value C(all).
|
||||
- IP address can be specified, such as 172.27.1.10.
|
||||
- IP rangees can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
|
||||
- IP ranges can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
|
||||
type: list
|
||||
auth_name:
|
||||
description:
|
||||
|
@ -437,11 +437,11 @@ class ModuleParameters(Parameters):
|
|||
"ssl_protocols may not be set to 'none'"
|
||||
)
|
||||
if protocols == 'default':
|
||||
protocols = ' '.join(sorted(Parameters._protocols.split(' ')))
|
||||
protocols = ' '.join(Parameters._protocols.split(' '))
|
||||
elif isinstance(protocols, string_types):
|
||||
protocols = ' '.join(sorted(protocols.split(' ')))
|
||||
protocols = ' '.join(protocols.split(' '))
|
||||
else:
|
||||
protocols = ' '.join(sorted(protocols))
|
||||
protocols = ' '.join(protocols)
|
||||
return protocols
|
||||
|
||||
|
||||
|
@ -489,7 +489,7 @@ class ReportableChanges(Changes):
|
|||
|
||||
@property
|
||||
def ssl_protocols(self):
|
||||
default = ' '.join(sorted(Parameters._protocols.split(' ')))
|
||||
default = ' '.join(Parameters._protocols.split(' '))
|
||||
if self._values['ssl_protocols'] == default:
|
||||
return 'default'
|
||||
else:
|
||||
|
|
|
@ -241,7 +241,7 @@ class TestModuleManager(unittest.TestCase):
|
|||
|
||||
results = mm.exec_module()
|
||||
assert results['changed'] is True
|
||||
assert results['ssl_protocols'] == '-SSLv2 all'
|
||||
assert results['ssl_protocols'] == 'all -SSLv2'
|
||||
|
||||
def test_update_issue_00587_as_list(self, *args):
|
||||
set_module_args(
|
||||
|
@ -272,7 +272,7 @@ class TestModuleManager(unittest.TestCase):
|
|||
|
||||
results = mm.exec_module()
|
||||
assert results['changed'] is True
|
||||
assert results['ssl_protocols'] == '-SSLv2 all'
|
||||
assert results['ssl_protocols'] == 'all -SSLv2'
|
||||
|
||||
def test_update_issue_00587_default(self, *args):
|
||||
set_module_args(
|
||||
|
|
Loading…
Reference in a new issue