diff --git a/lib/ansible/modules/network/f5/bigip_asm_policy_import.py b/lib/ansible/modules/network/f5/bigip_asm_policy_import.py index 06f4e5e0cfd..4322137a803 100644 --- a/lib/ansible/modules/network/f5/bigip_asm_policy_import.py +++ b/lib/ansible/modules/network/f5/bigip_asm_policy_import.py @@ -35,15 +35,16 @@ options: versions of BIG-IP. The opposite, however, is true; you can import older into newer. - The file format can be binary of XML. + type: path force: description: - When set to C(yes) any existing policy with the same name will be overwritten by the new import. - - Works in both inline and file imports, if policy does not exist this setting is ignored. + - Works for both inline and file imports, if the policy does not exist this setting is ignored. default: no type: bool partition: description: - - Device partition to manage resources on. + - Device partition to create policy on. default: Common extends_documentation_fragment: f5 author: @@ -84,8 +85,8 @@ EXAMPLES = r''' ''' RETURN = r''' -file: - description: Local path to ASM policy file. +source: + description: Local path to an ASM policy file. returned: changed type: str sample: /root/some_policy.xml @@ -365,10 +366,10 @@ class ModuleManager(object): if response['status'] == 'FAILURE': raise F5ModuleError( - 'Failed to export ASM policy.' + 'Failed to import ASM policy.' ) if response['status'] == 'COMPLETED': - return True + return True def import_file_to_device(self): name = os.path.split(self.want.source)[1] diff --git a/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py b/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py index 001d270331e..00e0e225fa8 100644 --- a/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py +++ b/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py @@ -351,7 +351,7 @@ class ModuleParameters(Parameters): return self._values['name'] if self._signature_set_exists_on_device(self._values['name']): - return self._values['name'] + return self._values['name'] raise F5ModuleError( "The specified signature {0} set does not exist.".format( diff --git a/lib/ansible/modules/network/f5/bigip_device_dns.py b/lib/ansible/modules/network/f5/bigip_device_dns.py index eb2adb1ef83..0de472c122c 100644 --- a/lib/ansible/modules/network/f5/bigip_device_dns.py +++ b/lib/ansible/modules/network/f5/bigip_device_dns.py @@ -283,7 +283,7 @@ class Difference(object): if self.have.name_servers is None: return self.want.name_servers if set(self.want.name_servers) != set(self.have.name_servers): - return self.want.name_servers + return self.want.name_servers @property def search(self): @@ -305,7 +305,7 @@ class Difference(object): if self.have.search is None: return self.want.search if set(self.want.search) != set(self.have.search): - return self.want.search + return self.want.search class ModuleManager(object): diff --git a/lib/ansible/modules/network/f5/bigip_device_sshd.py b/lib/ansible/modules/network/f5/bigip_device_sshd.py index 9c2c2b2dd43..b3f4a49e83a 100644 --- a/lib/ansible/modules/network/f5/bigip_device_sshd.py +++ b/lib/ansible/modules/network/f5/bigip_device_sshd.py @@ -282,7 +282,7 @@ class Difference(object): if self.have.allow is None: return self.want.allow if set(self.want.allow) != set(self.have.allow): - return self.want.allow + return self.want.allow class ModuleManager(object): diff --git a/lib/ansible/modules/network/f5/bigip_iapp_template.py b/lib/ansible/modules/network/f5/bigip_iapp_template.py index fe58b304fa9..5a24914821d 100644 --- a/lib/ansible/modules/network/f5/bigip_iapp_template.py +++ b/lib/ansible/modules/network/f5/bigip_iapp_template.py @@ -151,8 +151,8 @@ class Parameters(AnsibleF5Parameters): if self._values['name']: return self._values['name'] if self._values['content']: - name = self._get_template_name() - return name + name = self._get_template_name() + return name return None @property diff --git a/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py b/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py index 7025db3fb5c..e9bc3f53181 100644 --- a/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py +++ b/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py @@ -710,7 +710,7 @@ class Difference(object): if self.have.options is None: return self.want.options if set(self.want.options) != set(self.have.options): - return self.want.options + return self.want.options @property def sni_require(self): diff --git a/lib/ansible/modules/network/f5/bigip_profile_http.py b/lib/ansible/modules/network/f5/bigip_profile_http.py index 212e7ffac6b..ff496f916d7 100644 --- a/lib/ansible/modules/network/f5/bigip_profile_http.py +++ b/lib/ansible/modules/network/f5/bigip_profile_http.py @@ -359,7 +359,7 @@ class ModuleParameters(Parameters): @property def proxy_type(self): if self._values['proxy_type'] is None: - return None + return None if self._values['proxy_type'] == 'explicit': if self.dns_resolver is None or self.dns_resolver == '': raise F5ModuleError( @@ -626,7 +626,7 @@ class Difference(object): else: return self.want.encrypt_cookies if set(self.want.encrypt_cookies) != set(self.have.encrypt_cookies): - return self.want.encrypt_cookies + return self.want.encrypt_cookies @property def encrypt_cookie_secret(self): diff --git a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py index f8fde603186..3d850bfc372 100644 --- a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py +++ b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py @@ -296,7 +296,7 @@ class Difference(object): if self.content: return self.want.source_path if self.want.source_path != self.have.source_path: - return self.want.source_path + return self.want.source_path @property def content(self): diff --git a/lib/ansible/modules/network/f5/bigip_ssl_key.py b/lib/ansible/modules/network/f5/bigip_ssl_key.py index add7cbc81ae..296ed772b30 100644 --- a/lib/ansible/modules/network/f5/bigip_ssl_key.py +++ b/lib/ansible/modules/network/f5/bigip_ssl_key.py @@ -267,7 +267,7 @@ class Difference(object): if self.key_checksum: return self.want.key_source_path if self.want.key_source_path != self.have.key_source_path: - return self.want.key_source_path + return self.want.key_source_path class ModuleManager(object): diff --git a/lib/ansible/modules/network/f5/bigip_vcmp_guest.py b/lib/ansible/modules/network/f5/bigip_vcmp_guest.py index b337a065158..0506e124493 100644 --- a/lib/ansible/modules/network/f5/bigip_vcmp_guest.py +++ b/lib/ansible/modules/network/f5/bigip_vcmp_guest.py @@ -710,7 +710,7 @@ class ModuleManager(object): def virtual_disk_exists(self): response = self.get_virtual_disk_on_device() if response: - return True + return True return False def remove_virtual_disk_from_device(self): @@ -743,7 +743,7 @@ class ModuleManager(object): try: response = resp.json() except ValueError as ex: - raise F5ModuleError(str(ex)) + raise F5ModuleError(str(ex)) if resp.status == 404 or 'code' in response and response['code'] == 404: return True @@ -767,7 +767,7 @@ class ModuleManager(object): try: response = resp.json() except ValueError: - return False + return False if 'code' in response and response['code'] == 400: if 'message' in response: raise F5ModuleError(response['message'])