diff --git a/lib/ansible/modules/network/f5/bigip_device_httpd.py b/lib/ansible/modules/network/f5/bigip_device_httpd.py index 38c3310a3e..7c5802e570 100644 --- a/lib/ansible/modules/network/f5/bigip_device_httpd.py +++ b/lib/ansible/modules/network/f5/bigip_device_httpd.py @@ -454,15 +454,13 @@ class ModuleManager(object): resource.modify(**params) return True except ConnectionError as ex: - pass - - # BIG-IP will kill your management connection when you change the HTTP - # redirect setting. So this catches that and handles it gracefully. - if 'Connection aborted' in str(ex) and 'redirectHttpToHttps' in params: - # Wait for BIG-IP web server to settle after changing this - time.sleep(2) - return True - raise F5ModuleError(str(ex)) + # BIG-IP will kill your management connection when you change the HTTP + # redirect setting. So this catches that and handles it gracefully. + if 'Connection aborted' in str(ex) and 'redirectHttpToHttps' in params: + # Wait for BIG-IP web server to settle after changing this + time.sleep(2) + return True + raise F5ModuleError(str(ex)) def read_current_from_device(self): resource = self.client.api.tm.sys.httpd.load()