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.
|
range for other systems that can communicate with this system.
|
||||||
- To specify all addresses, use the value C(all).
|
- To specify all addresses, use the value C(all).
|
||||||
- IP address can be specified, such as 172.27.1.10.
|
- 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
|
type: list
|
||||||
auth_name:
|
auth_name:
|
||||||
description:
|
description:
|
||||||
|
@ -437,11 +437,11 @@ class ModuleParameters(Parameters):
|
||||||
"ssl_protocols may not be set to 'none'"
|
"ssl_protocols may not be set to 'none'"
|
||||||
)
|
)
|
||||||
if protocols == 'default':
|
if protocols == 'default':
|
||||||
protocols = ' '.join(sorted(Parameters._protocols.split(' ')))
|
protocols = ' '.join(Parameters._protocols.split(' '))
|
||||||
elif isinstance(protocols, string_types):
|
elif isinstance(protocols, string_types):
|
||||||
protocols = ' '.join(sorted(protocols.split(' ')))
|
protocols = ' '.join(protocols.split(' '))
|
||||||
else:
|
else:
|
||||||
protocols = ' '.join(sorted(protocols))
|
protocols = ' '.join(protocols)
|
||||||
return protocols
|
return protocols
|
||||||
|
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ class ReportableChanges(Changes):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ssl_protocols(self):
|
def ssl_protocols(self):
|
||||||
default = ' '.join(sorted(Parameters._protocols.split(' ')))
|
default = ' '.join(Parameters._protocols.split(' '))
|
||||||
if self._values['ssl_protocols'] == default:
|
if self._values['ssl_protocols'] == default:
|
||||||
return 'default'
|
return 'default'
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -241,7 +241,7 @@ class TestModuleManager(unittest.TestCase):
|
||||||
|
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
assert results['changed'] is True
|
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):
|
def test_update_issue_00587_as_list(self, *args):
|
||||||
set_module_args(
|
set_module_args(
|
||||||
|
@ -272,7 +272,7 @@ class TestModuleManager(unittest.TestCase):
|
||||||
|
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
assert results['changed'] is True
|
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):
|
def test_update_issue_00587_default(self, *args):
|
||||||
set_module_args(
|
set_module_args(
|
||||||
|
|
Loading…
Add table
Reference in a new issue