summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Angel Muñoz González <magonzalez@fortinet.com>2019-08-28 21:49:25 +0200
committerNilashish Chakraborty <nilashishchakraborty8@gmail.com>2019-08-29 01:19:25 +0530
commita1d997cacb4e271f8be13af7bccc8c88b537a799 (patch)
tree213dcf44bf5c9b5ac2c6fe7f31ff43c2e4a577b1
parent59ab4d930723d030bd662836e84f1886bd2d7799 (diff)
downloadansible-a1d997cacb4e271f8be13af7bccc8c88b537a799.tar.gz
Minor bug fixes - 5 (#61462)
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns6.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_ipv6_neighbor_cache.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_ipv6_tunnel.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_link_monitor.py12
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_mac_address_table.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_management_tunnel.py5
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_mobile_tunnel.py16
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_nat64.py11
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_nd_proxy.py5
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_netflow.py11
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_network_visibility.py5
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_ntp.py5
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_object_tagging.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_password_policy.py17
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_password_policy_guest_admin.py17
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py10
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_probe_response.py5
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_proxy_arp.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_admin.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_alertmail.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_auth.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_device_detection_portal.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_ec.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_fortiguard_wf.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_ftp.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_group.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_http.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_icap.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_mail.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_nac_quar.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_nntp.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_spam.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_sslvpn.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_traffic_quota.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_utm.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_replacemsg_webproxy.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_resource_limits.py8
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_sdn_connector.py26
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_session_helper.py2
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_session_ttl.py5
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_sflow.py4
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_snmp_community.py12
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_snmp_user.py6
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_storage.py4
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_tos_based_priority.py4
-rw-r--r--lib/ansible/modules/network/fortios/fortios_system_vdom.py26
48 files changed, 240 insertions, 132 deletions
diff --git a/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns.py b/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns.py
index f32387f052..a6fcbbfe9f 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ips_urlfilter_dns
short_description: Configure IPS URL filter 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 ips_urlfilter_dns 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},
@@ -293,6 +294,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns6.py b/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns6.py
index 9577ce87e6..75e70dad3d 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns6.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_ips_urlfilter_dns6.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ips_urlfilter_dns6
short_description: Configure IPS URL filter IPv6 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 ips_urlfilter_dns6 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
@@ -263,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},
@@ -283,6 +284,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_ipv6_neighbor_cache.py b/lib/ansible/modules/network/fortios/fortios_system_ipv6_neighbor_cache.py
index a0c25caacf..89d463b035 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_ipv6_neighbor_cache.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_ipv6_neighbor_cache.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ipv6_neighbor_cache
short_description: Configure IPv6 neighbor cache 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 ipv6_neighbor_cache 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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_ipv6_tunnel.py b/lib/ansible/modules/network/fortios/fortios_system_ipv6_tunnel.py
index e2a502a7b1..75475375bc 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_ipv6_tunnel.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_ipv6_tunnel.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ipv6_tunnel
short_description: Configure IPv6/IPv4 in IPv6 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 ipv6_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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_link_monitor.py b/lib/ansible/modules/network/fortios/fortios_system_link_monitor.py
index 80c8d4f53d..6536163dea 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_link_monitor.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_link_monitor.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_link_monitor
short_description: Configure Link Health 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 link_monitor 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
@@ -94,7 +95,7 @@ options:
- ipv6
failtime:
description:
- - Number of retry attempts before the server is considered down (1 - 10, default = 5)
+ - Number of retry attempts before the server is considered down (1 - 10)
type: int
gateway_ip:
description:
@@ -122,7 +123,7 @@ options:
type: str
interval:
description:
- - Detection interval (1 - 3600 sec, default = 5).
+ - Detection interval (1 - 3600 sec).
type: int
name:
description:
@@ -154,7 +155,7 @@ options:
- ping6
recoverytime:
description:
- - Number of successful responses received before server is considered recovered (1 - 10, default = 5).
+ - Number of successful responses received before server is considered recovered (1 - 10).
type: int
security_mode:
description:
@@ -402,7 +403,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},
@@ -452,6 +453,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_mac_address_table.py b/lib/ansible/modules/network/fortios/fortios_system_mac_address_table.py
index 3e7a993872..20d67e1c52 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_mac_address_table.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_mac_address_table.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_mac_address_table
short_description: Configure MAC address 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 system feature and mac_address_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
@@ -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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_management_tunnel.py b/lib/ansible/modules/network/fortios/fortios_system_management_tunnel.py
index db3e6cf105..5619c0ed87 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_management_tunnel.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_management_tunnel.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_management_tunnel
short_description: Management tunnel configuration 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 management_tunnel category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -288,7 +288,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},
@@ -316,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_mobile_tunnel.py b/lib/ansible/modules/network/fortios/fortios_system_mobile_tunnel.py
index d893b0c5c0..8304f21b92 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_mobile_tunnel.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_mobile_tunnel.py
@@ -27,7 +27,7 @@ module: fortios_system_mobile_tunnel
short_description: Configure Mobile tunnels, an implementation of Network Mobility (NEMO) extensions for Mobile IPv4 RFC5177 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 mobile_tunnel category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -77,6 +77,7 @@ options:
description:
- Indicates whether to create or remove the object.
type: str
+ required: true
choices:
- present
- absent
@@ -102,7 +103,7 @@ options:
type: str
lifetime:
description:
- - NMMO HA registration request lifetime (180 - 65535 sec, default = 65535).
+ - NMMO HA registration request lifetime (180 - 65535 sec).
type: int
n_mhae_key:
description:
@@ -117,7 +118,7 @@ options:
- base64
n_mhae_spi:
description:
- - "NEMO authentication SPI (default: 256)."
+ - "NEMO authentication SPI ."
type: int
name:
description:
@@ -144,15 +145,15 @@ options:
type: str
reg_interval:
description:
- - NMMO HA registration interval (5 - 300, default = 5).
+ - NMMO HA registration interval (5 - 300).
type: int
reg_retry:
description:
- - Maximum number of NMMO HA registration retries (1 to 30, default = 3).
+ - Maximum number of NMMO HA registration retries (1 to 30).
type: int
renew_interval:
description:
- - Time before lifetime expiraton to send NMMO HA re-registration (5 - 60, default = 60).
+ - Time before lifetime expiraton to send NMMO HA re-registration (5 - 60).
type: int
roaming_interface:
description:
@@ -358,7 +359,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},
@@ -399,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_nat64.py b/lib/ansible/modules/network/fortios/fortios_system_nat64.py
index 8e0299de19..df37c6565b 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_nat64.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_nat64.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_nat64
short_description: Configure NAT64 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 nat64 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:
always_synthesize_aaaa_record:
description:
- - Enable/disable AAAA record synthesis (default = enable).
+ - Enable/disable AAAA record synthesis .
type: str
choices:
- enable
@@ -101,7 +101,7 @@ options:
- disable
nat64_prefix:
description:
- - "NAT64 prefix must be ::/96 (default = 64:ff9b::/96)."
+ - "NAT64 prefix must be ::/96 ."
type: str
secondary_prefix:
description:
@@ -126,7 +126,7 @@ options:
- disable
status:
description:
- - Enable/disable NAT64 (default = disable).
+ - Enable/disable NAT64 .
type: str
choices:
- enable
@@ -298,7 +298,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 +329,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_nd_proxy.py b/lib/ansible/modules/network/fortios/fortios_system_nd_proxy.py
index 44a1ee55e8..09799bf5ae 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_nd_proxy.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_nd_proxy.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_nd_proxy
short_description: Configure IPv6 neighbor discovery proxy (RFC4389) 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 nd_proxy category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -253,7 +253,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_netflow.py b/lib/ansible/modules/network/fortios/fortios_system_netflow.py
index e1d51c9260..0600f291fa 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_netflow.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_netflow.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_netflow
short_description: Configure NetFlow 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 netflow 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:
active_flow_timeout:
description:
- - Timeout to report active flows (1 - 60 min, default = 30).
+ - Timeout to report active flows (1 - 60 min).
type: int
collector_ip:
description:
@@ -92,7 +92,7 @@ options:
type: int
inactive_flow_timeout:
description:
- - Timeout for periodic report of finished flows (10 - 600 sec, default = 15).
+ - Timeout for periodic report of finished flows (10 - 600 sec).
type: int
source_ip:
description:
@@ -104,7 +104,7 @@ options:
type: int
template_tx_timeout:
description:
- - Timeout for periodic template flowset transmission (1 - 1440 min, default = 30).
+ - Timeout for periodic template flowset transmission (1 - 1440 min).
type: int
'''
@@ -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},
@@ -292,6 +292,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_network_visibility.py b/lib/ansible/modules/network/fortios/fortios_system_network_visibility.py
index e334eb9435..52f841dcf1 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_network_visibility.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_network_visibility.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_network_visibility
short_description: Configure network visibility 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 system feature and network_visibility 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},
@@ -301,6 +301,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_ntp.py b/lib/ansible/modules/network/fortios/fortios_system_ntp.py
index 0a996c551b..000bcbfe29 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_ntp.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_ntp.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_ntp
short_description: Configure system NTP information 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 ntp category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -331,7 +331,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},
@@ -370,6 +370,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_object_tagging.py b/lib/ansible/modules/network/fortios/fortios_system_object_tagging.py
index 06d0795d11..966d78678f 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_object_tagging.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_object_tagging.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_object_tagging
short_description: Configure object tagging 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 object_tagging 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
@@ -310,7 +311,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},
@@ -341,6 +342,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_password_policy.py b/lib/ansible/modules/network/fortios/fortios_system_password_policy.py
index 728150bf86..3108242b07 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_password_policy.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_password_policy.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_password_policy
short_description: Configure password policy for locally defined administrator passwords and IPsec VPN pre-shared keys 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 password_policy category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -94,7 +94,7 @@ options:
- disable
expire_day:
description:
- - Number of days after which passwords expire (1 - 999 days, default = 90).
+ - Number of days after which passwords expire (1 - 999 days).
type: int
expire_status:
description:
@@ -105,23 +105,23 @@ options:
- disable
min_lower_case_letter:
description:
- - Minimum number of lowercase characters in password (0 - 128, default = 0).
+ - Minimum number of lowercase characters in password (0 - 128).
type: int
min_non_alphanumeric:
description:
- - Minimum number of non-alphanumeric characters in password (0 - 128, default = 0).
+ - Minimum number of non-alphanumeric characters in password (0 - 128).
type: int
min_number:
description:
- - Minimum number of numeric characters in password (0 - 128, default = 0).
+ - Minimum number of numeric characters in password (0 - 128).
type: int
min_upper_case_letter:
description:
- - Minimum number of uppercase characters in password (0 - 128, default = 0).
+ - Minimum number of uppercase characters in password (0 - 128).
type: int
minimum_length:
description:
- - Minimum password length (8 - 128, default = 8).
+ - Minimum password length (8 - 128).
type: int
reuse_password:
description:
@@ -306,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},
@@ -337,6 +337,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_password_policy_guest_admin.py b/lib/ansible/modules/network/fortios/fortios_system_password_policy_guest_admin.py
index 474f0d12d6..bf526ada9f 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_password_policy_guest_admin.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_password_policy_guest_admin.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_password_policy_guest_admin
short_description: Configure the password policy for guest administrators 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 password_policy_guest_admin category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -93,7 +93,7 @@ options:
- disable
expire_day:
description:
- - Number of days after which passwords expire (1 - 999 days, default = 90).
+ - Number of days after which passwords expire (1 - 999 days).
type: int
expire_status:
description:
@@ -104,23 +104,23 @@ options:
- disable
min_lower_case_letter:
description:
- - Minimum number of lowercase characters in password (0 - 128, default = 0).
+ - Minimum number of lowercase characters in password (0 - 128).
type: int
min_non_alphanumeric:
description:
- - Minimum number of non-alphanumeric characters in password (0 - 128, default = 0).
+ - Minimum number of non-alphanumeric characters in password (0 - 128).
type: int
min_number:
description:
- - Minimum number of numeric characters in password (0 - 128, default = 0).
+ - Minimum number of numeric characters in password (0 - 128).
type: int
min_upper_case_letter:
description:
- - Minimum number of uppercase characters in password (0 - 128, default = 0).
+ - Minimum number of uppercase characters in password (0 - 128).
type: int
minimum_length:
description:
- - Minimum password length (8 - 128, default = 8).
+ - Minimum password length (8 - 128).
type: int
reuse_password:
description:
@@ -305,7 +305,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},
@@ -336,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py b/lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py
index 5ffe21eb9c..38f612d5fa 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_pppoe_interface
short_description: Configure the PPPoE interfaces 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 pppoe_interface 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
@@ -131,11 +132,11 @@ options:
- disable
lcp_echo_interval:
description:
- - PPPoE LCP echo interval in (0-4294967295 sec, default = 5).
+ - PPPoE LCP echo interval in (0-4294967295 sec).
type: int
lcp_max_echo_fails:
description:
- - Maximum missed LCP echo messages before disconnect (0-4294967295, default = 3).
+ - Maximum missed LCP echo messages before disconnect (0-4294967295).
type: int
name:
description:
@@ -350,7 +351,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_probe_response.py b/lib/ansible/modules/network/fortios/fortios_system_probe_response.py
index eb1d4d4ffc..cea8d3730a 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_probe_response.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_probe_response.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_probe_response
short_description: Configure system probe response 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 probe_response category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -281,7 +281,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 +306,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_proxy_arp.py b/lib/ansible/modules/network/fortios/fortios_system_proxy_arp.py
index efba99d536..844e563ef0 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_proxy_arp.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_proxy_arp.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_proxy_arp
short_description: Configure proxy-ARP 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 proxy_arp 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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_admin.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_admin.py
index 979e5fb63c..9752158b61 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_admin.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_admin.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_admin
short_description: Replacement messages 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_replacemsg feature and admin 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_alertmail.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_alertmail.py
index ca1914d5a8..628d7980b6 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_alertmail.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_alertmail.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_alertmail
short_description: Replacement messages 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_replacemsg feature and alertmail 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_auth.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_auth.py
index cc7d5d7495..4ba65c8df5 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_auth.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_auth.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_auth
short_description: Replacement messages 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_replacemsg feature and auth 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_device_detection_portal.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_device_detection_portal.py
index 071bf6bcc8..9824c8a7a9 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_device_detection_portal.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_device_detection_portal.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_device_detection_portal
short_description: Replacement messages 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_replacemsg feature and device_detection_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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ec.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ec.py
index cec57a3395..d503dd6dc6 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ec.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ec.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_ec
short_description: Replacement messages 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_replacemsg feature and ec 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_fortiguard_wf.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_fortiguard_wf.py
index 9e114fc9f9..c19709cf43 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_fortiguard_wf.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_fortiguard_wf.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_fortiguard_wf
short_description: Replacement messages 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_replacemsg feature and fortiguard_wf 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ftp.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ftp.py
index a774814639..41b0fe8960 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ftp.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_ftp.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_ftp
short_description: Replacement messages 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_replacemsg feature and ftp 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_group.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_group.py
index 42d05a4f9a..d4bed83c42 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_group.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_group.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_group
short_description: Configure replacement message 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 system feature and replacemsg_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
@@ -924,7 +925,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},
@@ -1126,6 +1127,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_http.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_http.py
index 68a0da3a41..01b011754b 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_http.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_http.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_http
short_description: Replacement messages 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_replacemsg feature and http 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_icap.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_icap.py
index d1ee7de932..ccd0bd7d24 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_icap.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_icap.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_icap
short_description: Replacement messages 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_replacemsg feature and icap 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py
index 5cad9d2f54..d55dc57070 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_image
short_description: Configure replacement message images 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 replacemsg_image 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
@@ -270,7 +271,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_mail.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_mail.py
index ad7c10dd0d..92cc39f36d 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_mail.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_mail.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_mail
short_description: Replacement messages 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_replacemsg feature and mail 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nac_quar.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nac_quar.py
index 2858a0e036..2bb44f3234 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nac_quar.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nac_quar.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_nac_quar
short_description: Replacement messages 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_replacemsg feature and nac_quar 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nntp.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nntp.py
index 2306780dca..67888f8a39 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nntp.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_nntp.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_nntp
short_description: Replacement messages 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_replacemsg feature and nntp 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_spam.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_spam.py
index 8e87395849..e792479af3 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_spam.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_spam.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_spam
short_description: Replacement messages 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_replacemsg feature and spam 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_sslvpn.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_sslvpn.py
index e8ba441bce..3cb230efff 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_sslvpn.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_sslvpn.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_sslvpn
short_description: Replacement messages 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_replacemsg feature and sslvpn 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_traffic_quota.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_traffic_quota.py
index db2f01f1e7..ab4041ee99 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_traffic_quota.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_traffic_quota.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_traffic_quota
short_description: Replacement messages 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_replacemsg feature and traffic_quota 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_utm.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_utm.py
index 11b1300411..a6e6686f23 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_utm.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_utm.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_utm
short_description: Replacement messages 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_replacemsg feature and utm 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_webproxy.py b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_webproxy.py
index 3bf41ebe96..53abc68b91 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_replacemsg_webproxy.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_replacemsg_webproxy.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_replacemsg_webproxy
short_description: Replacement messages 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_replacemsg feature and webproxy 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
@@ -279,7 +280,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},
@@ -303,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_resource_limits.py b/lib/ansible/modules/network/fortios/fortios_system_resource_limits.py
index 7b51d0981c..4a01d37056 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_resource_limits.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_resource_limits.py
@@ -24,9 +24,9 @@ ANSIBLE_METADATA = {'status': ['preview'],
DOCUMENTATION = '''
---
module: fortios_system_resource_limits
-short_description: Configure resource limits in Fortinet's FortiOS (FOS) and FortiGate.
+short_description: Configure resource limits 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 resource_limits category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -328,7 +328,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},
@@ -361,7 +361,7 @@ def main():
module = AnsibleModule(argument_spec=fields,
supports_check_mode=False)
- # legacy_mode refers to using fortiosapi instead of HTTPAPI.
+ # 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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_sdn_connector.py b/lib/ansible/modules/network/fortios/fortios_system_sdn_connector.py
index 5e5d75c391..9a6f0fb45f 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_sdn_connector.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_sdn_connector.py
@@ -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
access_key:
description:
- AWS access key ID.
@@ -492,7 +505,12 @@ def underscore_to_hyphen(data):
def system_sdn_connector(data, fos):
vdom = data['vdom']
- state = data['state']
+ if 'state' in data and data['state']:
+ state = data['state']
+ elif 'state' in data['system_sdn_connector'] and data['system_sdn_connector']:
+ state = data['system_sdn_connector']['state']
+ else:
+ state = True
system_sdn_connector_data = data['system_sdn_connector']
filtered_data = underscore_to_hyphen(filter_system_sdn_connector_data(system_sdn_connector_data))
@@ -532,11 +550,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_sdn_connector": {
"required": False, "type": "dict", "default": None,
"options": {
+ "state": {"required": False, "type": "str",
+ "choices": ["present", "absent"]},
"access_key": {"required": False, "type": "str"},
"azure_region": {"required": False, "type": "str",
"choices": ["global", "china", "germany",
diff --git a/lib/ansible/modules/network/fortios/fortios_system_session_helper.py b/lib/ansible/modules/network/fortios/fortios_system_session_helper.py
index 8888178a2b..aacc21d568 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_session_helper.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_session_helper.py
@@ -29,7 +29,7 @@ description:
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
user to set and modify system feature and session_helper category.
Examples include all parameters and values need to be adjusted to datasources before usage.
- Tested with FOS v6.0.4
+ Tested with FOS v6.0.5
version_added: "2.9"
author:
- Miguel Angel Munoz (@mamunozgonzalez)
diff --git a/lib/ansible/modules/network/fortios/fortios_system_session_ttl.py b/lib/ansible/modules/network/fortios/fortios_system_session_ttl.py
index c9d9fc0585..6dae9a287d 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_session_ttl.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_session_ttl.py
@@ -26,7 +26,7 @@ DOCUMENTATION = '''
module: fortios_system_session_ttl
short_description: Configure global session TTL timers for 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 session_ttl category.
Examples include all parameters and values need to be adjusted to datasources before usage.
Tested with FOS v6.0.5
@@ -271,7 +271,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},
@@ -295,6 +295,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
diff --git a/lib/ansible/modules/network/fortios/fortios_system_sflow.py b/lib/ansible/modules/network/fortios/fortios_system_sflow.py
index ca55e3921e..8f1c22456a 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_sflow.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_sflow.py
@@ -80,12 +80,12 @@ options:
suboptions:
collector_ip:
description:
- - IP address of the sFlow collector that sFlow agents added to interfaces in this VDOM send sFlow datagrams to (default = 0.0.0.0).
+ - IP address of the sFlow collector that sFlow agents added to interfaces in this VDOM send sFlow datagrams to .
type: str
collector_port:
description:
- UDP port number used for sending sFlow datagrams (configure only if required by your sFlow collector or your network configuration) (0 -
- 65535, default = 6343).
+ 65535).
type: int
source_ip:
description:
diff --git a/lib/ansible/modules/network/fortios/fortios_system_snmp_community.py b/lib/ansible/modules/network/fortios/fortios_system_snmp_community.py
index f3af308dfb..2cff630f2d 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_snmp_community.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_snmp_community.py
@@ -203,7 +203,7 @@ options:
type: str
query_v1_port:
description:
- - SNMP v1 query port (default = 161).
+ - SNMP v1 query port .
type: int
query_v1_status:
description:
@@ -214,7 +214,7 @@ options:
- disable
query_v2c_port:
description:
- - SNMP v2c query port (default = 161).
+ - SNMP v2c query port .
type: int
query_v2c_status:
description:
@@ -232,11 +232,11 @@ options:
- disable
trap_v1_lport:
description:
- - SNMP v1 trap local port (default = 162).
+ - SNMP v1 trap local port .
type: int
trap_v1_rport:
description:
- - SNMP v1 trap remote port (default = 162).
+ - SNMP v1 trap remote port .
type: int
trap_v1_status:
description:
@@ -247,11 +247,11 @@ options:
- disable
trap_v2c_lport:
description:
- - SNMP v2c trap local port (default = 162).
+ - SNMP v2c trap local port .
type: int
trap_v2c_rport:
description:
- - SNMP v2c trap remote port (default = 162).
+ - SNMP v2c trap remote port .
type: int
trap_v2c_status:
description:
diff --git a/lib/ansible/modules/network/fortios/fortios_system_snmp_user.py b/lib/ansible/modules/network/fortios/fortios_system_snmp_user.py
index 3bcbb1648a..540d351c41 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_snmp_user.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_snmp_user.py
@@ -179,7 +179,7 @@ options:
- disable
query_port:
description:
- - SNMPv3 query port (default = 161).
+ - SNMPv3 query port .
type: int
security_level:
description:
@@ -206,11 +206,11 @@ options:
- disable
trap_lport:
description:
- - SNMPv3 local trap port (default = 162).
+ - SNMPv3 local trap port .
type: int
trap_rport:
description:
- - SNMPv3 trap remote port (default = 162).
+ - SNMPv3 trap remote port .
type: int
trap_status:
description:
diff --git a/lib/ansible/modules/network/fortios/fortios_system_storage.py b/lib/ansible/modules/network/fortios/fortios_system_storage.py
index f81117f14f..25aa9d8bc4 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_storage.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_storage.py
@@ -124,14 +124,14 @@ options:
- disable
usage:
description:
- - Use hard disk for logging or WAN Optimization (default = log).
+ - Use hard disk for logging or WAN Optimization .
type: str
choices:
- log
- wanopt
wanopt_mode:
description:
- - WAN Optimization mode (default = mix).
+ - WAN Optimization mode .
type: str
choices:
- mix
diff --git a/lib/ansible/modules/network/fortios/fortios_system_tos_based_priority.py b/lib/ansible/modules/network/fortios/fortios_system_tos_based_priority.py
index f9eaf15edc..e5496395dd 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_tos_based_priority.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_tos_based_priority.py
@@ -93,7 +93,7 @@ options:
type: int
priority:
description:
- - ToS based priority level to low, medium or high (these priorities match firewall traffic shaping priorities) (default = medium).
+ - ToS based priority level to low, medium or high (these priorities match firewall traffic shaping priorities) .
type: str
choices:
- low
@@ -102,7 +102,7 @@ options:
tos:
description:
- "Value of the ToS byte in the IP datagram header (0-15, 8: minimize delay, 4: maximize throughput, 2: maximize reliability, 1: minimize
- monetary cost, and 0: default service)."
+ monetary cost, and 0: )."
type: int
'''
diff --git a/lib/ansible/modules/network/fortios/fortios_system_vdom.py b/lib/ansible/modules/network/fortios/fortios_system_vdom.py
index 8c411097bf..87b2784a63 100644
--- a/lib/ansible/modules/network/fortios/fortios_system_vdom.py
+++ b/lib/ansible/modules/network/fortios/fortios_system_vdom.py
@@ -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
name:
description:
- VDOM name.
@@ -238,7 +251,12 @@ def underscore_to_hyphen(data):
def system_vdom(data, fos):
vdom = data['vdom']
- state = data['state']
+ if 'state' in data and data['state']:
+ state = data['state']
+ elif 'state' in data['system_vdom'] and data['system_vdom']:
+ state = data['system_vdom']['state']
+ else:
+ state = True
system_vdom_data = data['system_vdom']
filtered_data = underscore_to_hyphen(filter_system_vdom_data(system_vdom_data))
@@ -278,11 +296,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_vdom": {
"required": False, "type": "dict", "default": None,
"options": {
+ "state": {"required": False, "type": "str",
+ "choices": ["present", "absent"]},
"name": {"required": True, "type": "str"},
"short_name": {"required": False, "type": "str"},
"temporary": {"required": False, "type": "int"},