diff --git a/lib/ansible/modules/network/f5/bigip_gtm_datacenter.py b/lib/ansible/modules/network/f5/bigip_gtm_datacenter.py index a3b9a01137b..08f69cbdfb0 100644 --- a/lib/ansible/modules/network/f5/bigip_gtm_datacenter.py +++ b/lib/ansible/modules/network/f5/bigip_gtm_datacenter.py @@ -320,7 +320,7 @@ class BigIpGtmDatacenter(object): enabled = self.params['enabled'] if state is None and enabled is None: - module.fail_json(msg="Neither 'state' nor 'enabled' set") + raise F5ModuleError("Neither 'state' nor 'enabled' set") try: if state == "present": diff --git a/lib/ansible/modules/network/f5/bigip_routedomain.py b/lib/ansible/modules/network/f5/bigip_routedomain.py index 4f5c1538019..d4c970cbced 100644 --- a/lib/ansible/modules/network/f5/bigip_routedomain.py +++ b/lib/ansible/modules/network/f5/bigip_routedomain.py @@ -476,18 +476,12 @@ class BigIpRouteDomain(object): result = dict() state = self.params['state'] - if self.params['check_mode']: - if value == current: - changed = False - else: - changed = True - else: - if state == "present": - changed = self.present() - current = self.read() - result.update(current) - elif state == "absent": - changed = self.absent() + if state == "present": + changed = self.present() + current = self.read() + result.update(current) + elif state == "absent": + changed = self.absent() result.update(dict(changed=changed)) return result diff --git a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py index 2aa6c453217..52dd836d699 100644 --- a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py +++ b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py @@ -444,6 +444,8 @@ class BigIpSslCertificate(object): def delete(self): changed = False + name = self.params['name'] + partition = self.params['partition'] check_mode = self.params['check_mode']