Minor bug fixes - 3 (#61458)

This commit is contained in:
Miguel Angel Muñoz González 2019-08-29 05:46:07 +02:00 committed by Nilashish Chakraborty
parent 9f006dd8c7
commit 86aab259fc
48 changed files with 550 additions and 124 deletions

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
id:
description:
- Rule ID.
@ -222,7 +235,12 @@ def underscore_to_hyphen(data):
def ips_rule_settings(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['ips_rule_settings'] and data['ips_rule_settings']:
state = data['ips_rule_settings']['state']
else:
state = True
ips_rule_settings_data = data['ips_rule_settings']
filtered_data = underscore_to_hyphen(filter_ips_rule_settings_data(ips_rule_settings_data))
@ -262,11 +280,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"ips_rule_settings": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"id": {"required": True, "type": "int"}
}

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
block_malicious_url:
description:
- Enable/disable malicious URL blocking.
@ -604,7 +617,12 @@ def underscore_to_hyphen(data):
def ips_sensor(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['ips_sensor'] and data['ips_sensor']:
state = data['ips_sensor']['state']
else:
state = True
ips_sensor_data = data['ips_sensor']
filtered_data = underscore_to_hyphen(filter_ips_sensor_data(ips_sensor_data))
@ -644,11 +662,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"ips_sensor": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"block_malicious_url": {"required": False, "type": "str",
"choices": ["disable", "enable"]},
"comment": {"required": False, "type": "str"},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
id:
description:
- field ID <string>.
@ -232,7 +245,12 @@ def underscore_to_hyphen(data):
def log_custom_field(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['log_custom_field'] and data['log_custom_field']:
state = data['log_custom_field']['state']
else:
state = True
log_custom_field_data = data['log_custom_field']
filtered_data = underscore_to_hyphen(filter_log_custom_field_data(log_custom_field_data))
@ -272,11 +290,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"log_custom_field": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"id": {"required": True, "type": "str"},
"name": {"required": False, "type": "str"},
"value": {"required": False, "type": "str"}

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
background:
description:
- Chart background.
@ -637,7 +650,12 @@ def underscore_to_hyphen(data):
def report_chart(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['report_chart'] and data['report_chart']:
state = data['report_chart']['state']
else:
state = True
report_chart_data = data['report_chart']
filtered_data = underscore_to_hyphen(filter_report_chart_data(report_chart_data))
@ -677,11 +695,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"report_chart": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"background": {"required": False, "type": "str"},
"category": {"required": False, "type": "str",
"choices": ["misc", "traffic", "event",

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
field:
description:
- Fields.
@ -299,7 +312,12 @@ def underscore_to_hyphen(data):
def report_dataset(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['report_dataset'] and data['report_dataset']:
state = data['report_dataset']['state']
else:
state = True
report_dataset_data = data['report_dataset']
filtered_data = underscore_to_hyphen(filter_report_dataset_data(report_dataset_data))
@ -339,11 +357,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"report_dataset": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"field": {"required": False, "type": "list",
"options": {
"displayname": {"required": False, "type": "str"},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
body_item:
description:
- Configure report body item.
@ -651,7 +664,12 @@ def underscore_to_hyphen(data):
def report_layout(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['report_layout'] and data['report_layout']:
state = data['report_layout']['state']
else:
state = True
report_layout_data = data['report_layout']
filtered_data = underscore_to_hyphen(filter_report_layout_data(report_layout_data))
@ -691,11 +709,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"report_layout": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"body_item": {"required": False, "type": "list",
"options": {
"chart": {"required": False, "type": "str"},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
align:
description:
- Alignment.
@ -385,7 +398,12 @@ def underscore_to_hyphen(data):
def report_style(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['report_style'] and data['report_style']:
state = data['report_style']['state']
else:
state = True
report_style_data = data['report_style']
filtered_data = underscore_to_hyphen(filter_report_style_data(report_style_data))
@ -425,11 +443,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"report_style": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"align": {"required": False, "type": "str",
"choices": ["left", "center", "right",
"justify"]},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
bullet_list_style:
description:
- Bullet list style.
@ -383,7 +396,12 @@ def underscore_to_hyphen(data):
def report_theme(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['report_theme'] and data['report_theme']:
state = data['report_theme']['state']
else:
state = True
report_theme_data = data['report_theme']
filtered_data = underscore_to_hyphen(filter_report_theme_data(report_theme_data))
@ -423,11 +441,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"report_theme": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"bullet_list_style": {"required": False, "type": "str"},
"column_count": {"required": False, "type": "str",
"choices": ["1", "2", "3"]},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
comments:
description:
- Comment.
@ -271,7 +284,12 @@ def underscore_to_hyphen(data):
def router_access_list(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_access_list'] and data['router_access_list']:
state = data['router_access_list']['state']
else:
state = True
router_access_list_data = data['router_access_list']
filtered_data = underscore_to_hyphen(filter_router_access_list_data(router_access_list_data))
@ -311,11 +329,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_access_list": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"comments": {"required": False, "type": "str"},
"name": {"required": True, "type": "str"},
"rule": {"required": False, "type": "list",

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_aspath_list
short_description: Configure Autonomous System (AS) path lists in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and aspath_list category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -281,7 +282,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -306,6 +307,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
device:
description:
- Outgoing interface. Source system.interface.name.
@ -232,7 +245,12 @@ def underscore_to_hyphen(data):
def router_auth_path(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_auth_path'] and data['router_auth_path']:
state = data['router_auth_path']['state']
else:
state = True
router_auth_path_data = data['router_auth_path']
filtered_data = underscore_to_hyphen(filter_router_auth_path_data(router_auth_path_data))
@ -272,11 +290,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_auth_path": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"device": {"required": False, "type": "str"},
"gateway": {"required": False, "type": "str"},
"name": {"required": True, "type": "str"}

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_community_list
short_description: Configure community lists in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and community_list category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -294,7 +295,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -322,6 +323,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_isis
short_description: Configure IS-IS in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and isis category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -851,7 +851,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -1011,6 +1011,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_key_chain
short_description: Configure key-chain in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and key_chain category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -283,7 +284,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -308,6 +309,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
comments:
description:
- Comment.
@ -250,7 +263,12 @@ def underscore_to_hyphen(data):
def router_multicast_flow(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_multicast_flow'] and data['router_multicast_flow']:
state = data['router_multicast_flow']['state']
else:
state = True
router_multicast_flow_data = data['router_multicast_flow']
filtered_data = underscore_to_hyphen(filter_router_multicast_flow_data(router_multicast_flow_data))
@ -290,11 +308,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_multicast_flow": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"comments": {"required": False, "type": "str"},
"flows": {"required": False, "type": "list",
"options": {

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
action:
description:
- Action of the policy route.
@ -374,7 +387,12 @@ def underscore_to_hyphen(data):
def router_policy(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_policy'] and data['router_policy']:
state = data['router_policy']['state']
else:
state = True
router_policy_data = data['router_policy']
filtered_data = underscore_to_hyphen(filter_router_policy_data(router_policy_data))
@ -414,11 +432,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_policy": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"action": {"required": False, "type": "str",
"choices": ["deny", "permit"]},
"comments": {"required": False, "type": "str"},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
comments:
description:
- Optional comments.
@ -288,7 +301,12 @@ def underscore_to_hyphen(data):
def router_policy6(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_policy6'] and data['router_policy6']:
state = data['router_policy6']['state']
else:
state = True
router_policy6_data = data['router_policy6']
filtered_data = underscore_to_hyphen(filter_router_policy6_data(router_policy6_data))
@ -328,11 +346,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_policy6": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"comments": {"required": False, "type": "str"},
"dst": {"required": False, "type": "str"},
"end_port": {"required": False, "type": "int"},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
comments:
description:
- Comment.
@ -268,7 +281,12 @@ def underscore_to_hyphen(data):
def router_prefix_list(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_prefix_list'] and data['router_prefix_list']:
state = data['router_prefix_list']['state']
else:
state = True
router_prefix_list_data = data['router_prefix_list']
filtered_data = underscore_to_hyphen(filter_router_prefix_list_data(router_prefix_list_data))
@ -308,11 +326,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_prefix_list": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"comments": {"required": False, "type": "str"},
"name": {"required": True, "type": "str"},
"rule": {"required": False, "type": "list",

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_prefix_list6
short_description: Configure IPv6 prefix lists in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and prefix_list6 category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -301,7 +302,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -330,6 +331,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_ripng
short_description: Configure RIPng in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and ripng category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -518,7 +518,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -605,6 +605,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_route_map
short_description: Configure route maps in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and route_map category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -543,7 +544,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -630,6 +631,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
bfd:
description:
- Enable/disable Bidirectional Forwarding Detection (BFD).
@ -335,7 +348,12 @@ def underscore_to_hyphen(data):
def router_static(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['router_static'] and data['router_static']:
state = data['router_static']['state']
else:
state = True
router_static_data = data['router_static']
filtered_data = underscore_to_hyphen(filter_router_static_data(router_static_data))
@ -375,11 +393,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"router_static": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"bfd": {"required": False, "type": "str",
"choices": ["enable", "disable"]},
"blackhole": {"required": False, "type": "str",

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_router_static6
short_description: Configure IPv6 static routing tables in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify router feature and static6 category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -324,7 +325,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -357,6 +358,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_bwl
short_description: Configure anti-spam black/white list in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and bwl category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -149,7 +150,7 @@ options:
- email
id:
description:
- Id of this entry for configuring antispam black/white lists.
- ID.
required: true
type: int
name:
@ -335,7 +336,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -372,6 +373,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_bword
short_description: Configure AntiSpam banned word list in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and bword category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -151,7 +152,7 @@ options:
- all
id:
description:
- Id of the entry for this configuration of the AntiSpam banned word list.
- ID.
required: true
type: int
name:
@ -336,7 +337,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -374,6 +375,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_dnsbl
short_description: Configure AntiSpam DNSBL/ORBL in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and dnsbl category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -119,7 +120,7 @@ options:
- disable
id:
description:
- Id of the spamfilter dnsb entry.
- ID.
required: true
type: int
name:
@ -300,7 +301,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -329,6 +330,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_fortishield
short_description: Configure FortiGuard - AntiSpam in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and fortishield category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -254,7 +254,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -274,6 +274,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_iptrust
short_description: Configure AntiSpam IP trust in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and iptrust category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -123,7 +124,7 @@ options:
- disable
id:
description:
- Id of the spamfilter iptrust entry.
- ID.
required: true
type: int
name:
@ -305,7 +306,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -335,6 +336,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_mheader
short_description: Configure AntiSpam MIME header in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and mheader category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -130,7 +131,7 @@ options:
- disable
id:
description:
- Identification of this config for MIME header.
- ID.
required: true
type: int
name:
@ -313,7 +314,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -345,6 +346,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_spamfilter_options
short_description: Configure AntiSpam options in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify spamfilter feature and options category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -238,7 +238,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -254,6 +254,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
comment:
description:
- Comment.
@ -530,7 +543,12 @@ def underscore_to_hyphen(data):
def spamfilter_profile(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['spamfilter_profile'] and data['spamfilter_profile']:
state = data['spamfilter_profile']['state']
else:
state = True
spamfilter_profile_data = data['spamfilter_profile']
spamfilter_profile_data = flatten_multilists_attributes(spamfilter_profile_data)
filtered_data = underscore_to_hyphen(filter_spamfilter_profile_data(spamfilter_profile_data))
@ -571,11 +589,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"spamfilter_profile": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"comment": {"required": False, "type": "str"},
"external": {"required": False, "type": "str",
"choices": ["enable", "disable"]},

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
block:
description:
- SSH blocking options.
@ -317,7 +330,12 @@ def underscore_to_hyphen(data):
def ssh_filter_profile(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['ssh_filter_profile'] and data['ssh_filter_profile']:
state = data['ssh_filter_profile']['state']
else:
state = True
ssh_filter_profile_data = data['ssh_filter_profile']
filtered_data = underscore_to_hyphen(filter_ssh_filter_profile_data(ssh_filter_profile_data))
@ -357,11 +375,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"ssh_filter_profile": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"block": {"required": False, "type": "str",
"choices": ["x11", "shell", "exec",
"port-forward", "tun-forward", "sftp",

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_802_1X_settings
short_description: Configure global 802.1X settings in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and 802_1X_settings category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -91,7 +91,7 @@ options:
type: int
reauth_period:
description:
- Period of time to allow for reauthentication (1 - 1440 sec, 0 = disable reauthentication).
- Period of time to allow for reauthentication (1 - 1440 sec).
type: int
'''
@ -251,7 +251,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -270,6 +270,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_custom_command
short_description: Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and custom_command category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -265,7 +266,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -285,6 +286,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_igmp_snooping
short_description: Configure FortiSwitch IGMP snooping global settings in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and igmp_snooping category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -80,7 +80,7 @@ options:
suboptions:
aging_time:
description:
- Maximum number of seconds to retain a multicast snooping entry for which no packets have been seen (15 - 3600 sec, default = 300).
- Maximum number of seconds to retain a multicast snooping entry for which no packets have been seen (15 - 3600 sec).
type: int
flood_unknown_multicast:
description:
@ -246,7 +246,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -264,6 +264,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
802.1_tlvs:
description:
- Transmitted IEEE 802.1 TLVs.
@ -335,7 +348,12 @@ def underscore_to_hyphen(data):
def switch_controller_lldp_profile(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['switch_controller_lldp_profile'] and data['switch_controller_lldp_profile']:
state = data['switch_controller_lldp_profile']['state']
else:
state = True
switch_controller_lldp_profile_data = data['switch_controller_lldp_profile']
filtered_data = underscore_to_hyphen(filter_switch_controller_lldp_profile_data(switch_controller_lldp_profile_data))
@ -375,11 +393,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"switch_controller_lldp_profile": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"802.1_tlvs": {"required": False, "type": "str",
"choices": ["port-vlan-id"]},
"802.3_tlvs": {"required": False, "type": "str",

View file

@ -76,8 +76,10 @@ options:
state:
description:
- Indicates whether to create or remove the object.
This attribute was present already in previous version in a deeper level.
It has been moved out to this outer level.
type: str
required: true
required: false
choices:
- present
- absent
@ -88,6 +90,17 @@ options:
default: null
type: dict
suboptions:
state:
description:
- B(Deprecated)
- Starting with Ansible 2.9 we recommend using the top-level 'state' parameter.
- HORIZONTALLINE
- Indicates whether to create or remove the object.
type: str
required: false
choices:
- present
- absent
802_1X_settings:
description:
- Configuration method to edit FortiSwitch 802.1X global settings.
@ -1091,7 +1104,12 @@ def underscore_to_hyphen(data):
def switch_controller_managed_switch(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['switch_controller_managed_switch'] and data['switch_controller_managed_switch']:
state = data['switch_controller_managed_switch']['state']
else:
state = True
switch_controller_managed_switch_data = data['switch_controller_managed_switch']
filtered_data = underscore_to_hyphen(filter_switch_controller_managed_switch_data(switch_controller_managed_switch_data))
@ -1131,11 +1149,13 @@ def main():
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
"state": {"required": True, "type": "str",
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"switch_controller_managed_switch": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"802_1X_settings": {"required": False, "type": "dict",
"options": {
"link_down_auth": {"required": False, "type": "str",

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_qos_dot1p_map
short_description: Configure FortiSwitch QoS 802.1p in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller_qos feature and dot1p_map category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -375,7 +376,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -426,6 +427,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_qos_ip_dscp_map
short_description: Configure FortiSwitch QoS IP precedence/DSCP in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller_qos feature and ip_dscp_map category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -325,7 +325,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True, "default": ""},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -362,6 +362,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_qos_qos_policy
short_description: Configure FortiSwitch QoS policy in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller_qos feature and qos_policy category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -299,6 +299,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_qos_queue_policy
short_description: Configure FortiSwitch QoS egress queue policy in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller_qos feature and queue_policy category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -305,7 +306,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -335,6 +336,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_quarantine
short_description: Configure FortiSwitch quarantine support in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and quarantine category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -277,7 +277,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -304,6 +304,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_security_policy_802_1X
short_description: Configure 802.1x MAC Authentication Bypass (MAB) policies in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller_security_policy feature and 802_1X category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -109,7 +110,7 @@ options:
- enable
guest_auth_delay:
description:
- Guest authentication delay (1 - 900 sec, default = 30).
- Guest authentication delay (1 - 900 sec).
type: int
guest_vlan:
description:
@ -360,7 +361,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -403,6 +404,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_security_policy_captive_portal
short_description: Names of VLANs that use captive portal authentication in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller_security_policy feature and captive_portal category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -267,7 +268,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -288,6 +289,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_sflow
short_description: Configure FortiSwitch sFlow in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and sflow category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -243,7 +243,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -260,6 +260,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_storm_control
short_description: Configure FortiSwitch storm control in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and storm_control category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -87,8 +87,8 @@ options:
- disable
rate:
description:
- Rate in packets per second at which storm traffic is controlled (1 - 10000000). Storm control drops excess traffic data
rates beyond this threshold.
- Rate in packets per second at which storm traffic is controlled (1 - 10000000). Storm control drops excess traffic data rates beyond
this threshold.
type: int
unknown_multicast:
description:
@ -264,7 +264,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -286,6 +286,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_stp_settings
short_description: Configure FortiSwitch spanning tree protocol (STP) in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and stp_settings category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -278,7 +278,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -302,6 +302,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None

View file

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_switch_group
short_description: Configure FortiSwitch switch groups in Fortinet's FortiOS and FortiGate.
description:
- This module is able to configure a FortiGate or FortiOS device by allowing the
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify switch_controller feature and switch_group category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -273,7 +274,7 @@ def main():
fields = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"password": {"required": False, "type": "str", "default": "", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": True},
@ -296,6 +297,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
# legacy_mode refers to using fortiosapi instead of HTTPAPI
legacy_mode = 'host' in module.params and module.params['host'] is not None and \
'username' in module.params and module.params['username'] is not None and \
'password' in module.params and module.params['password'] is not None