Minor bug fixes - 3 (#61461)

pull/61491/head
Miguel Angel Muñoz González 5 years ago committed by Nilashish Chakraborty
parent a1d997cacb
commit f9b0ab774f

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_switch_interface_tag
short_description: Configure switch object tags 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_interface_tag 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
@ -255,7 +256,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},
@ -273,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_switch_log
short_description: Configure FortiSwitch logging (logs are transferred to and inserted into FortiGate event log) 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_log category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -255,7 +255,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},
@ -276,6 +276,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_switch_profile
short_description: Configure FortiSwitch switch profile 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_profile category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -44,12 +44,12 @@ options:
description:
- FortiOS or FortiGate IP address.
type: str
required: true
required: false
username:
description:
- FortiOS or FortiGate username.
type: str
required: true
required: false
password:
description:
- FortiOS or FortiGate password.
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -102,7 +103,6 @@ options:
- FortiSwitch Profile name.
required: true
type: str
'''
EXAMPLES = '''
@ -270,7 +270,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},
@ -291,6 +291,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_system
short_description: Configure system-wide switch controller 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 system 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:
parallel_process:
description:
- Maximum number of parallel processes (1 - 300, default = 1).
- Maximum number of parallel processes (1 - 300).
type: int
parallel_process_override:
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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_virtual_port_pool
short_description: Configure virtual pool 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 virtual_port_pool category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -44,12 +44,12 @@ options:
description:
- FortiOS or FortiGate IP address.
type: str
required: true
required: false
username:
description:
- FortiOS or FortiGate username.
type: str
required: true
required: false
password:
description:
- FortiOS or FortiGate password.
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -260,7 +261,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},
@ -279,6 +280,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_switch_controller_vlan
short_description: Configure VLANs for switch controller 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 vlan category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -44,12 +44,12 @@ options:
description:
- FortiOS or FortiGate IP address.
type: str
required: true
required: false
username:
description:
- FortiOS or FortiGate username.
type: str
required: true
required: false
password:
description:
- FortiOS or FortiGate password.
@ -76,6 +76,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
required: true
choices:
- present
- absent
@ -349,7 +350,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},
@ -389,6 +390,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

@ -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
admintimeout:
description:
- Administrator timeout for this access profile (0 - 480 min).
@ -622,7 +635,12 @@ def underscore_to_hyphen(data):
def system_accprofile(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['system_accprofile'] and data['system_accprofile']:
state = data['system_accprofile']['state']
else:
state = True
system_accprofile_data = data['system_accprofile']
filtered_data = underscore_to_hyphen(filter_system_accprofile_data(system_accprofile_data))
@ -662,11 +680,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"]},
"system_accprofile": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"admintimeout": {"required": False, "type": "int"},
"admintimeout_override": {"required": False, "type": "str",
"choices": ["enable", "disable"]},

@ -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
accprofile:
description:
- Access profile for this administrator. Access profiles control administrator access to FortiGate features. Source system.accprofile.name.
@ -780,7 +793,12 @@ def underscore_to_hyphen(data):
def system_admin(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['system_admin'] and data['system_admin']:
state = data['system_admin']['state']
else:
state = True
system_admin_data = data['system_admin']
filtered_data = underscore_to_hyphen(filter_system_admin_data(system_admin_data))
@ -820,11 +838,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"]},
"system_admin": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"accprofile": {"required": False, "type": "str"},
"accprofile_override": {"required": False, "type": "str",
"choices": ["enable", "disable"]},

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_affinity_interrupt
short_description: Configure interrupt affinity 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 system feature and affinity_interrupt 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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_affinity_packet_redistribution
short_description: Configure packet redistribution 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 system feature and affinity_packet_redistribution 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
@ -271,7 +272,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},
@ -292,6 +293,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_alarm
short_description: Configure alarm 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 system feature and alarm category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -360,7 +360,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},
@ -404,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_alias
short_description: Configure alias command 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 system feature and alias 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
@ -260,7 +261,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},
@ -279,6 +280,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

@ -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
accprofile:
description:
- Admin user access profile. Source system.accprofile.name.
@ -307,7 +320,12 @@ def underscore_to_hyphen(data):
def system_api_user(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['system_api_user'] and data['system_api_user']:
state = data['system_api_user']['state']
else:
state = True
system_api_user_data = data['system_api_user']
filtered_data = underscore_to_hyphen(filter_system_api_user_data(system_api_user_data))
@ -347,11 +365,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"]},
"system_api_user": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"accprofile": {"required": False, "type": "str"},
"api_key": {"required": False, "type": "str"},
"comments": {"required": False, "type": "str"},

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_arp_table
short_description: Configure ARP table 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 system feature and arp_table 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
@ -271,7 +272,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},
@ -292,6 +293,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_auto_install
short_description: Configure USB auto installation 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 system feature and auto_install category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -260,7 +260,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},
@ -281,6 +281,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_auto_script
short_description: Configure auto script 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 system feature and auto_script 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
@ -96,7 +97,7 @@ options:
type: str
output_size:
description:
- Number of megabytes to limit script output to (10 - 1024, default = 10).
- Number of megabytes to limit script output to (10 - 1024).
type: int
repeat:
description:
@ -284,7 +285,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_automation_action
short_description: Action for automation stitches 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 system feature and automation_action 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
@ -387,7 +388,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},
@ -435,6 +436,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_automation_destination
short_description: Automation destinations 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 system feature and automation_destination 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
@ -97,7 +98,7 @@ options:
type: str
ha_group_id:
description:
- Cluster group ID set for this destination (default = 0).
- Cluster group ID set for this destination .
type: int
name:
description:
@ -282,7 +283,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},
@ -307,6 +308,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_automation_stitch
short_description: Automation stitches 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 system feature and automation_stitch 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
@ -295,7 +296,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},
@ -324,6 +325,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_automation_trigger
short_description: Trigger for automation stitches 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 system feature and automation_trigger 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
@ -134,7 +135,7 @@ options:
type: int
trigger_frequency:
description:
- Scheduled trigger frequency (default = daily).
- Scheduled trigger frequency .
type: str
choices:
- hourly
@ -143,7 +144,7 @@ options:
- monthly
trigger_hour:
description:
- Hour of the day on which to trigger (0 - 23, default = 1).
- Hour of the day on which to trigger (0 - 23).
type: int
trigger_minute:
description:
@ -346,7 +347,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},
@ -388,6 +389,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_autoupdate_push_update
short_description: Configure push updates 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 system_autoupdate feature and push_update category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -260,7 +260,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},
@ -281,6 +281,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_autoupdate_schedule
short_description: Configure update schedule 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 system_autoupdate feature and schedule category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -269,7 +269,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},
@ -293,6 +293,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_autoupdate_tunneling
short_description: Configure web proxy tunnelling for the FDN 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 system_autoupdate feature and tunneling category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -262,7 +262,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},
@ -283,6 +283,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_cluster_sync
short_description: Configure FortiGate Session Life Support Protocol (FGSP) session synchronization 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 system feature and cluster_sync 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
@ -377,7 +378,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},
@ -424,6 +425,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_console
short_description: Configure console 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 system feature and console category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -269,7 +269,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},
@ -293,6 +293,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_csf
short_description: Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate 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 system feature and csf category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -174,7 +174,7 @@ options:
type: str
upstream_port:
description:
- The port number to use to communicate with the FortiGate upstream from this FortiGate in the Security Fabric (default = 8013).
- The port number to use to communicate with the FortiGate upstream from this FortiGate in the Security Fabric .
type: int
'''
@ -356,7 +356,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},
@ -400,6 +400,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_custom_language
short_description: Configure custom languages 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 system feature and custom_language 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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ddns
short_description: Configure DDNS 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 system feature and ddns 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
@ -175,7 +176,7 @@ options:
type: str
update_interval:
description:
- DDNS update interval (60 - 2592000 sec, default = 300).
- DDNS update interval (60 - 2592000 sec).
type: int
use_public_ip:
description:
@ -373,7 +374,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},
@ -418,6 +419,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_dedicated_mgmt
short_description: Configure dedicated management 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 system feature and dedicated_mgmt category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -276,7 +276,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},
@ -300,6 +300,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_dhcp6_server
short_description: Configure DHCPv6 servers 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 system_dhcp6 feature and server 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
@ -408,7 +409,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},
@ -460,6 +461,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

@ -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
auto_configuration:
description:
- Enable/disable auto configuration.
@ -708,7 +721,12 @@ def underscore_to_hyphen(data):
def system_dhcp_server(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['system_dhcp_server'] and data['system_dhcp_server']:
state = data['system_dhcp_server']['state']
else:
state = True
system_dhcp_server_data = data['system_dhcp_server']
filtered_data = underscore_to_hyphen(filter_system_dhcp_server_data(system_dhcp_server_data))
@ -748,11 +766,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"]},
"system_dhcp_server": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"auto_configuration": {"required": False, "type": "str",
"choices": ["disable", "enable"]},
"conflicted_ip_timeout": {"required": False, "type": "int"},

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_dns_database
short_description: Configure DNS databases 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 system feature and dns_database 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
@ -397,7 +398,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},
@ -447,6 +448,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_dns_server
short_description: Configure DNS servers 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 system feature and dns_server 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
@ -269,7 +270,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},
@ -290,6 +291,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_dscp_based_priority
short_description: Configure DSCP based priority table 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 system feature and dscp_based_priority 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
@ -269,7 +270,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},
@ -290,6 +291,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

@ -27,7 +27,7 @@ module: fortios_system_email_server
short_description: Configure the email server used by the FortiGate various things. For example, for sending email messages to users to support user
authentication features 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 system feature and email_server category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -121,7 +121,7 @@ options:
type: str
ssl_min_proto_version:
description:
- Minimum supported protocol version for SSL/TLS connections (default is to follow system global setting).
- Minimum supported protocol version for SSL/TLS connections .
type: str
choices:
- default
@ -317,7 +317,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},
@ -350,6 +350,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_external_resource
short_description: Configure external resource 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 system feature and external_resource 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
@ -100,7 +101,7 @@ options:
type: str
refresh_rate:
description:
- Time interval to refresh external resource (1 - 43200 min, default = 5 min).
- Time interval to refresh external resource (1 - 43200 min).
type: int
resource:
description:
@ -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},
@ -320,6 +321,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_fips_cc
short_description: Configure FIPS-CC mode 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 system feature and fips_cc category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -255,7 +255,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},
@ -275,6 +275,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_fm
short_description: Configure FM 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 system feature and fm category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -282,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},
@ -308,6 +308,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_fortiguard
short_description: Configure FortiGuard services 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 system feature and fortiguard category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -111,7 +111,7 @@ options:
type: int
antispam_timeout:
description:
- Antispam query time out (1 - 30 sec, default = 7).
- Antispam query time out (1 - 30 sec).
type: int
auto_join_forticloud:
description:
@ -141,11 +141,11 @@ options:
- disable
outbreak_prevention_cache_mpercent:
description:
- Maximum percent of memory FortiGuard Virus Outbreak Prevention cache can use (1 - 15%, default = 2).
- Maximum percent of memory FortiGuard Virus Outbreak Prevention cache can use (1 - 15%).
type: int
outbreak_prevention_cache_ttl:
description:
- Time-to-live for FortiGuard Virus Outbreak Prevention cache entries (300 - 86400 sec, default = 300).
- Time-to-live for FortiGuard Virus Outbreak Prevention cache entries (300 - 86400 sec).
type: int
outbreak_prevention_expiration:
description:
@ -164,7 +164,7 @@ options:
type: int
outbreak_prevention_timeout:
description:
- FortiGuard Virus Outbreak Prevention time out (1 - 30 sec, default = 7).
- FortiGuard Virus Outbreak Prevention time out (1 - 30 sec).
type: int
port:
description:
@ -229,7 +229,7 @@ options:
type: int
webfilter_timeout:
description:
- Web filter query time out (1 - 30 sec, default = 7).
- Web filter query time out (1 - 30 sec).
type: int
'''
@ -427,7 +427,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},
@ -482,6 +482,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_fortimanager
short_description: Configure FortiManager 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 system feature and fortimanager category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -285,7 +285,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},
@ -312,6 +312,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_fortisandbox
short_description: Configure FortiSandbox 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 system feature and fortisandbox category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -100,7 +100,7 @@ options:
type: str
ssl_min_proto_version:
description:
- Minimum supported protocol version for SSL/TLS connections (default is to follow system global setting).
- Minimum supported protocol version for SSL/TLS connections .
type: str
choices:
- default
@ -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},
@ -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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_fsso_polling
short_description: Configure Fortinet Single Sign On (FSSO) server 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 system feature and fsso_polling category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -260,7 +260,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},
@ -281,6 +281,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ftm_push
short_description: Configure FortiToken Mobile push services 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 system feature and ftm_push category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -84,7 +84,7 @@ options:
type: str
server_port:
description:
- Port to communicate with FortiToken Mobile push services server (1 - 65535, default = 4433).
- Port to communicate with FortiToken Mobile push services server (1 - 65535).
type: int
status:
description:
@ -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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_geoip_override
short_description: Configure geographical location mapping for IP address(es) to override mappings from FortiGuard 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 system feature and geoip_override 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
@ -289,7 +290,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},
@ -315,6 +316,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_gre_tunnel
short_description: Configure GRE tunnel 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 system feature and gre_tunnel 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
@ -353,7 +354,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},
@ -392,6 +393,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

@ -13,7 +13,7 @@ from __future__ import (absolute_import, division, print_function)
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>
# along with this program. If not, see <https://www.gnu.org/licenses/>.
__metaclass__ = type
@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ha
short_description: Configure HA 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 system feature and ha category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -741,7 +741,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},
@ -868,6 +868,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

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ha_monitor
short_description: Configure HA monitor 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 system feature and ha_monitor category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@ -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

@ -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
ac_name:
description:
- PPPoE server name.
@ -2042,7 +2055,12 @@ def underscore_to_hyphen(data):
def system_interface(data, fos):
vdom = data['vdom']
state = data['state']
if 'state' in data and data['state']:
state = data['state']
elif 'state' in data['system_interface'] and data['system_interface']:
state = data['system_interface']['state']
else:
state = True
system_interface_data = data['system_interface']
system_interface_data = flatten_multilists_attributes(system_interface_data)
filtered_data = underscore_to_hyphen(filter_system_interface_data(system_interface_data))
@ -2083,11 +2101,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"]},
"system_interface": {
"required": False, "type": "dict", "default": None,
"options": {
"state": {"required": False, "type": "str",
"choices": ["present", "absent"]},
"ac_name": {"required": False, "type": "str"},
"aggregate": {"required": False, "type": "str"},
"algorithm": {"required": False, "type": "str",

@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ipip_tunnel
short_description: Configure IP in IP Tunneling 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 system feature and ipip_tunnel 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
@ -271,7 +272,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},
@ -292,6 +293,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

Loading…
Cancel
Save