Various small fixes for f5 ansible modules (#49492)

This commit is contained in:
Tim Rupp 2018-12-04 11:15:49 -08:00 committed by GitHub
commit 138690519d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 148 additions and 184 deletions

View file

@ -64,10 +64,11 @@ EXAMPLES = r'''
description: Route to TACACS
gateway: 10.10.10.10
network: 11.11.11.0/24
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''
@ -214,6 +215,8 @@ class Difference(object):
def network(self):
if self.want.network is None:
return None
if self.want.network == '0.0.0.0/0' and self.have.network == 'default':
return None
if self.want.network != self.have.network:
raise F5ModuleError(
"'network' cannot be changed after it is set."