@ -27,11 +27,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = """
- - -
module : cp_ network
module : cp_ mgmt_ network
short_description : Manages network objects on Checkpoint over Web Services API
description :
- Manages network objects on Checkpoint devices including creating , updating and removing objects .
All operations are performed over Web Services API .
- All operations are performed over Web Services API .
version_added : " 2.9 "
author : " Or Soffer (@chkp-orso) "
options :
@ -54,8 +54,8 @@ options:
type : str
mask_length :
description :
- IPv4 or IPv6 network mask length . If both masks are required use mask - length4 and mask - length6 fields
explicitly. Instead of IPv4 mask length it is possible to specify IPv4 mask itself in subnet - mask field .
- IPv4 or IPv6 network mask length . If both masks are required use mask - length4 and mask - length6 fields explicitly . Instead of IPv4 mask length
it is possible to specify IPv4 mask itself in subnet - mask field .
type : int
mask_length4 :
description :
@ -72,7 +72,7 @@ options:
nat_settings :
description :
- NAT settings .
type : lis t
type : dic t
suboptions :
auto_rule :
description :
@ -80,9 +80,8 @@ options:
type : bool
ip_address :
description :
- IPv4 or IPv6 address . If both addresses are required use ipv4 - address and ipv6 - address fields
explicitly . This parameter is not required in case " method " parameter is " hide " and " hide-behind " parameter
is " gateway " .
- IPv4 or IPv6 address . If both addresses are required use ipv4 - address and ipv6 - address fields explicitly . This parameter is not
required in case " method " parameter is " hide " and " hide-behind " parameter is " gateway " .
type : str
ipv4_address :
description :
@ -119,19 +118,17 @@ options:
description :
- Color of the object . Should be one of existing colors .
type : str
choices : [ ' aquamarine ' , ' black ' , ' blue ' , ' crete blue ' , ' burlywood ' , ' cyan ' , ' dark green ' , ' khaki ' ,
' orchid ' , ' dark orange ' , ' dark sea green ' , ' pink ' , ' turquoise ' , ' dark blue ' , ' firebrick ' , ' brown ' ,
' forest green ' , ' gold ' , ' dark gold ' , ' gray ' , ' dark gray ' , ' light green ' , ' lemon chiffon ' , ' coral ' ,
' sea green ' , ' sky blue ' , ' magenta ' , ' purple ' , ' slate blue ' , ' violet red ' , ' navy blue ' , ' olive ' , ' orange ' ,
' red ' , ' sienna ' , ' yellow ' ]
choices : [ ' aquamarine ' , ' black ' , ' blue ' , ' crete blue ' , ' burlywood ' , ' cyan ' , ' dark green ' , ' khaki ' , ' orchid ' , ' dark orange ' , ' dark sea green ' ,
' pink ' , ' turquoise ' , ' dark blue ' , ' firebrick ' , ' brown ' , ' forest green ' , ' gold ' , ' dark gold ' , ' gray ' , ' dark gray ' , ' light green ' , ' lemon chiffon ' ,
' coral ' , ' sea green ' , ' sky blue ' , ' magenta ' , ' purple ' , ' slate blue ' , ' violet red ' , ' navy blue ' , ' olive ' , ' orange ' , ' red ' , ' sienna ' , ' yellow ' ]
comments :
description :
- Comments string .
type : str
details_level :
description :
- The level of detail for some of the fields in the response can vary from showing only the UID value of
the object to a fully detailed representation of the object .
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed
representation of the object .
type : str
choices : [ ' uid ' , ' standard ' , ' full ' ]
groups :
@ -144,34 +141,22 @@ options:
type : bool
ignore_errors :
description :
- Apply changes ignoring errors . You won ' t be able to publish such a changes. If ignore-warnings flag was
omitted - warnings will also be ignored .
- Apply changes ignoring errors . You won ' t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
type : bool
new_name :
description :
- New name of the object .
type : str
extends_documentation_fragment : checkpoint_objects
"""
EXAMPLES = """
- name : add - network
cp_network :
name : New Network 3
nat_settings :
auto_rule : true
hide_behind : ip - address
install_on : All
ip_address : 192.0 .2 .1
method : static
cp_mgmt_network :
name : New Network 1
state : present
subnet : 192.0 .2 . 1
subnet : 192.0 .2 .0
subnet_mask : 255.255 .255 .0
- name : set - network
cp_ network:
cp_mgmt_network :
color : green
groups : New Group 1
mask_length : 16
name : New Network 1
new_name : New Network 2
@ -179,13 +164,13 @@ EXAMPLES = """
subnet : 192.0 .0 .0
- name : delete - network
cp_ network:
cp_ mgmt_ network:
name : New Network 2
state : absent
"""
RETURN = """
cp_ network:
cp_ mgmt_ network:
description : The checkpoint object created or updated .
returned : always , except when deleting the object .
type : dict
@ -205,7 +190,7 @@ def main():
mask_length4 = dict ( type = ' int ' ) ,
mask_length6 = dict ( type = ' int ' ) ,
subnet_mask = dict ( type = ' str ' ) ,
nat_settings = dict ( type = ' lis t' , options = dict (
nat_settings = dict ( type = ' dic t' , options = dict (
auto_rule = dict ( type = ' bool ' ) ,
ip_address = dict ( type = ' str ' ) ,
ipv4_address = dict ( type = ' str ' ) ,
@ -216,19 +201,16 @@ def main():
) ) ,
tags = dict ( type = ' list ' ) ,
broadcast = dict ( type = ' str ' , choices = [ ' disallow ' , ' allow ' ] ) ,
color = dict ( type = ' str ' , choices = [ ' aquamarine ' , ' black ' , ' blue ' ,
' crete blue ' , ' burlywood ' , ' cyan ' , ' dark green ' , ' khaki ' , ' orchid ' ,
' dark orange ' , ' dark sea green ' , ' pink ' , ' turquoise ' , ' dark blue ' , ' firebrick ' ,
' brown ' , ' forest green ' , ' gold ' , ' dark gold ' , ' gray ' , ' dark gray ' ,
' light green ' , ' lemon chiffon ' , ' coral ' , ' sea green ' , ' sky blue ' , ' magenta ' ,
' purple ' , ' slate blue ' , ' violet red ' , ' navy blue ' , ' olive ' , ' orange ' , ' red ' ,
' sienna ' , ' yellow ' ] ) ,
color = dict ( type = ' str ' , choices = [ ' aquamarine ' , ' black ' , ' blue ' , ' crete blue ' , ' burlywood ' , ' cyan ' , ' dark green ' ,
' khaki ' , ' orchid ' , ' dark orange ' , ' dark sea green ' , ' pink ' , ' turquoise ' , ' dark blue ' , ' firebrick ' , ' brown ' ,
' forest green ' , ' gold ' , ' dark gold ' , ' gray ' , ' dark gray ' , ' light green ' , ' lemon chiffon ' , ' coral ' , ' sea green ' ,
' sky blue ' , ' magenta ' , ' purple ' , ' slate blue ' , ' violet red ' , ' navy blue ' , ' olive ' , ' orange ' , ' red ' , ' sienna ' ,
' yellow ' ] ) ,
comments = dict ( type = ' str ' ) ,
details_level = dict ( type = ' str ' , choices = [ ' uid ' , ' standard ' , ' full ' ] ) ,
groups = dict ( type = ' list ' ) ,
ignore_warnings = dict ( type = ' bool ' ) ,
ignore_errors = dict ( type = ' bool ' ) ,
new_name = dict ( type = ' str ' )
ignore_errors = dict ( type = ' bool ' )
)
argument_spec . update ( checkpoint_argument_spec_for_objects )