@ -25,15 +25,18 @@ options:
name :
name :
description :
description :
- Specifies the name of the virtual server .
- Specifies the name of the virtual server .
type : str
version_added : 2.6
version_added : 2.6
server_name :
server_name :
description :
description :
- Specifies the name of the server that the virtual server is associated with .
- Specifies the name of the server that the virtual server is associated with .
type : str
version_added : 2.6
version_added : 2.6
address :
address :
description :
description :
- Specifies the IP Address of the virtual server .
- Specifies the IP Address of the virtual server .
- When creating a new GTM virtual server , this parameter is required .
- When creating a new GTM virtual server , this parameter is required .
type : str
version_added : 2.6
version_added : 2.6
port :
port :
description :
description :
@ -42,12 +45,14 @@ options:
- To specify all ports , use an C ( * ) .
- To specify all ports , use an C ( * ) .
- When creating a new GTM virtual server , if this parameter is not specified , a
- When creating a new GTM virtual server , if this parameter is not specified , a
default of C ( * ) will be used .
default of C ( * ) will be used .
type : int
translation_address :
translation_address :
description :
description :
- Specifies the translation IP address for the virtual server .
- Specifies the translation IP address for the virtual server .
- To unset this parameter , provide an empty string ( C ( " " ) ) as a value .
- To unset this parameter , provide an empty string ( C ( " " ) ) as a value .
- When creating a new GTM virtual server , if this parameter is not specified , a
- When creating a new GTM virtual server , if this parameter is not specified , a
default of C ( : : ) will be used .
default of C ( : : ) will be used .
type : str
version_added : 2.6
version_added : 2.6
translation_port :
translation_port :
description :
description :
@ -55,24 +60,31 @@ options:
- To specify all ports , use an C ( * ) .
- To specify all ports , use an C ( * ) .
- When creating a new GTM virtual server , if this parameter is not specified , a
- When creating a new GTM virtual server , if this parameter is not specified , a
default of C ( * ) will be used .
default of C ( * ) will be used .
type : str
version_added : 2.6
version_added : 2.6
availability_requirements :
availability_requirements :
description :
description :
- Specifies , if you activate more than one health monitor , the number of health
- Specifies , if you activate more than one health monitor , the number of health
monitors that must receive successful responses in order for the link to be
monitors that must receive successful responses in order for the link to be
considered available .
considered available .
type : dict
suboptions :
suboptions :
type :
type :
description :
description :
- Monitor rule type when C ( monitors ) is specified .
- Monitor rule type when C ( monitors ) is specified .
- When creating a new virtual , if this value is not specified , the default of ' all ' will be used .
- When creating a new virtual , if this value is not specified , the default of ' all ' will be used .
choices : [ ' all ' , ' at_least ' , ' require ' ]
type : str
choices :
- all
- at_least
- require
at_least :
at_least :
description :
description :
- Specifies the minimum number of active health monitors that must be successful
- Specifies the minimum number of active health monitors that must be successful
before the link is considered up .
before the link is considered up .
- This parameter is only relevant when a C ( type ) of C ( at_least ) is used .
- This parameter is only relevant when a C ( type ) of C ( at_least ) is used .
- This parameter will be ignored if a type of either C ( all ) or C ( require ) is used .
- This parameter will be ignored if a type of either C ( all ) or C ( require ) is used .
type : int
number_of_probes :
number_of_probes :
description :
description :
- Specifies the minimum number of probes that must succeed for this server to be declared up .
- Specifies the minimum number of probes that must succeed for this server to be declared up .
@ -81,6 +93,7 @@ options:
- The value of this parameter should always be B ( lower ) than , or B ( equal to ) , the value of C ( number_of_probers ) .
- The value of this parameter should always be B ( lower ) than , or B ( equal to ) , the value of C ( number_of_probers ) .
- This parameter is only relevant when a C ( type ) of C ( require ) is used .
- This parameter is only relevant when a C ( type ) of C ( require ) is used .
- This parameter will be ignored if a type of either C ( all ) or C ( at_least ) is used .
- This parameter will be ignored if a type of either C ( all ) or C ( at_least ) is used .
type : int
number_of_probers :
number_of_probers :
description :
description :
- Specifies the number of probers that should be used when running probes .
- Specifies the number of probers that should be used when running probes .
@ -89,30 +102,36 @@ options:
- The value of this parameter should always be B ( higher ) than , or B ( equal to ) , the value of C ( number_of_probers ) .
- The value of this parameter should always be B ( higher ) than , or B ( equal to ) , the value of C ( number_of_probers ) .
- This parameter is only relevant when a C ( type ) of C ( require ) is used .
- This parameter is only relevant when a C ( type ) of C ( require ) is used .
- This parameter will be ignored if a type of either C ( all ) or C ( at_least ) is used .
- This parameter will be ignored if a type of either C ( all ) or C ( at_least ) is used .
type : int
version_added : 2.6
version_added : 2.6
monitors :
monitors :
description :
description :
- Specifies the health monitors that the system currently uses to monitor this resource .
- Specifies the health monitors that the system currently uses to monitor this resource .
- When C ( availability_requirements . type ) is C ( require ) , you may only have a single monitor in the
- When C ( availability_requirements . type ) is C ( require ) , you may only have a single monitor in the
C ( monitors ) list .
C ( monitors ) list .
type : list
version_added : 2.6
version_added : 2.6
virtual_server_dependencies :
virtual_server_dependencies :
description :
description :
- Specifies the virtual servers on which the current virtual server depends .
- Specifies the virtual servers on which the current virtual server depends .
- If any of the specified servers are unavailable , the current virtual server is also listed as unavailable .
- If any of the specified servers are unavailable , the current virtual server is also listed as unavailable .
type : list
suboptions :
suboptions :
server :
server :
description :
description :
- Server which the dependant virtual server is part of .
- Server which the dependant virtual server is part of .
type : str
required : True
required : True
virtual_server :
virtual_server :
description :
description :
- Virtual server to depend on .
- Virtual server to depend on .
type : str
required : True
required : True
version_added : 2.6
version_added : 2.6
link :
link :
description :
description :
- Specifies a link to assign to the server or virtual server .
- Specifies a link to assign to the server or virtual server .
type : str
version_added : 2.6
version_added : 2.6
limits :
limits :
description :
description :
@ -123,6 +142,7 @@ options:
threshold limit requirement , the system marks the entire server as unavailable and directs load - balancing
threshold limit requirement , the system marks the entire server as unavailable and directs load - balancing
traffic to another resource .
traffic to another resource .
- The limit settings available depend on the type of server .
- The limit settings available depend on the type of server .
type : dict
suboptions :
suboptions :
bits_enabled :
bits_enabled :
description :
description :
@ -143,30 +163,35 @@ options:
description :
description :
- Specifies the maximum allowable data throughput rate , in bits per second , for the virtual servers on the server .
- Specifies the maximum allowable data throughput rate , in bits per second , for the virtual servers on the server .
- If the network traffic volume exceeds this limit , the system marks the server as unavailable .
- If the network traffic volume exceeds this limit , the system marks the server as unavailable .
type : int
packets_limit :
packets_limit :
description :
description :
- Specifies the maximum allowable data transfer rate , in packets per second , for the virtual servers on the server .
- Specifies the maximum allowable data transfer rate , in packets per second , for the virtual servers on the server .
- If the network traffic volume exceeds this limit , the system marks the server as unavailable .
- If the network traffic volume exceeds this limit , the system marks the server as unavailable .
type : int
connections_limit :
connections_limit :
description :
description :
- Specifies the maximum number of concurrent connections , combined , for all of the virtual servers on the server .
- Specifies the maximum number of concurrent connections , combined , for all of the virtual servers on the server .
- If the connections exceed this limit , the system marks the server as unavailable .
- If the connections exceed this limit , the system marks the server as unavailable .
type : int
version_added : 2.6
version_added : 2.6
partition :
partition :
description :
description :
- Device partition to manage resources on .
- Device partition to manage resources on .
type : str
default : Common
default : Common
version_added : 2.6
version_added : 2.6
state :
state :
description :
description :
- When C ( present ) , ensures that the resource exists .
- When C ( present ) , ensures that the resource exists .
- When C ( absent ) , ensures the resource is removed .
- When C ( absent ) , ensures the resource is removed .
default : present
type : str
choices :
choices :
- present
- present
- absent
- absent
- enabled
- enabled
- disabled
- disabled
default : present
extends_documentation_fragment : f5
extends_documentation_fragment : f5
author :
author :
- Tim Rupp ( @caphrim007 )
- Tim Rupp ( @caphrim007 )
@ -250,13 +275,10 @@ try:
from library . module_utils . network . f5 . bigip import F5RestClient
from library . module_utils . network . f5 . bigip import F5RestClient
from library . module_utils . network . f5 . common import F5ModuleError
from library . module_utils . network . f5 . common import F5ModuleError
from library . module_utils . network . f5 . common import AnsibleF5Parameters
from library . module_utils . network . f5 . common import AnsibleF5Parameters
from library . module_utils . network . f5 . common import cleanup_tokens
from library . module_utils . network . f5 . common import fq_name
from library . module_utils . network . f5 . common import fq_name
from library . module_utils . network . f5 . common import f5_argument_spec
from library . module_utils . network . f5 . common import f5_argument_spec
from library . module_utils . network . f5 . common import transform_name
from library . module_utils . network . f5 . common import transform_name
from library . module_utils . network . f5 . common import exit_json
from library . module_utils . network . f5 . compare import compare_complex_list
from library . module_utils . network . f5 . common import fail_json
from library . module_utils . network . f5 . common import compare_complex_list
from library . module_utils . network . f5 . icontrol import module_provisioned
from library . module_utils . network . f5 . icontrol import module_provisioned
from library . module_utils . network . f5 . ipaddress import is_valid_ip
from library . module_utils . network . f5 . ipaddress import is_valid_ip
from library . module_utils . network . f5 . ipaddress import validate_ip_v6_address
from library . module_utils . network . f5 . ipaddress import validate_ip_v6_address
@ -265,13 +287,10 @@ except ImportError:
from ansible . module_utils . network . f5 . bigip import F5RestClient
from ansible . module_utils . network . f5 . bigip import F5RestClient
from ansible . module_utils . network . f5 . common import F5ModuleError
from ansible . module_utils . network . f5 . common import F5ModuleError
from ansible . module_utils . network . f5 . common import AnsibleF5Parameters
from ansible . module_utils . network . f5 . common import AnsibleF5Parameters
from ansible . module_utils . network . f5 . common import cleanup_tokens
from ansible . module_utils . network . f5 . common import fq_name
from ansible . module_utils . network . f5 . common import fq_name
from ansible . module_utils . network . f5 . common import f5_argument_spec
from ansible . module_utils . network . f5 . common import f5_argument_spec
from ansible . module_utils . network . f5 . common import transform_name
from ansible . module_utils . network . f5 . common import transform_name
from ansible . module_utils . network . f5 . common import exit_json
from ansible . module_utils . network . f5 . compare import compare_complex_list
from ansible . module_utils . network . f5 . common import fail_json
from ansible . module_utils . network . f5 . common import compare_complex_list
from ansible . module_utils . network . f5 . icontrol import module_provisioned
from ansible . module_utils . network . f5 . icontrol import module_provisioned
from ansible . module_utils . network . f5 . ipaddress import is_valid_ip
from ansible . module_utils . network . f5 . ipaddress import is_valid_ip
from ansible . module_utils . network . f5 . ipaddress import validate_ip_v6_address
from ansible . module_utils . network . f5 . ipaddress import validate_ip_v6_address
@ -886,7 +905,7 @@ class Difference(object):
class ModuleManager ( object ) :
class ModuleManager ( object ) :
def __init__ ( self , * args , * * kwargs ) :
def __init__ ( self , * args , * * kwargs ) :
self . module = kwargs . get ( ' module ' , None )
self . module = kwargs . get ( ' module ' , None )
self . client = kwargs. get ( ' client ' , None )
self . client = F5RestClient( * * self . module . params )
self . want = ModuleParameters ( params = self . module . params )
self . want = ModuleParameters ( params = self . module . params )
self . have = ApiParameters ( )
self . have = ApiParameters ( )
self . changes = UsableChanges ( )
self . changes = UsableChanges ( )
@ -1165,16 +1184,12 @@ def main():
supports_check_mode = spec . supports_check_mode ,
supports_check_mode = spec . supports_check_mode ,
)
)
client = F5RestClient ( * * module . params )
try :
try :
mm = ModuleManager ( module = module , client = client )
mm = ModuleManager ( module = module )
results = mm . exec_module ( )
results = mm . exec_module ( )
cleanup_tokens ( client )
module . exit_json ( * * results )
exit_json ( module , results , client )
except F5ModuleError as ex :
except F5ModuleError as ex :
cleanup_tokens ( client )
module . fail_json ( msg = str ( ex ) )
fail_json ( module , ex , client )
if __name__ == ' __main__ ' :
if __name__ == ' __main__ ' :