From 3531bf3148aaccc54152bd9d12c36991efd0de3d Mon Sep 17 00:00:00 2001 From: Wojciech Wypior Date: Fri, 21 Jun 2019 14:46:54 +0100 Subject: [PATCH] fixes issue with ssl protocols ordering (#58177) --- lib/ansible/modules/network/f5/bigip_device_httpd.py | 10 +++++----- .../modules/network/f5/test_bigip_device_httpd.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/ansible/modules/network/f5/bigip_device_httpd.py b/lib/ansible/modules/network/f5/bigip_device_httpd.py index b5211f82400..931fc6cf7f5 100644 --- a/lib/ansible/modules/network/f5/bigip_device_httpd.py +++ b/lib/ansible/modules/network/f5/bigip_device_httpd.py @@ -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: diff --git a/test/units/modules/network/f5/test_bigip_device_httpd.py b/test/units/modules/network/f5/test_bigip_device_httpd.py index 45552da32b9..e54d6ff2f9c 100644 --- a/test/units/modules/network/f5/test_bigip_device_httpd.py +++ b/test/units/modules/network/f5/test_bigip_device_httpd.py @@ -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(