fmgr_fsp_vlan_dynamicmapping_dhcpserver – Configure DHCP servers.

New in version 2.10.

Synopsis

  • This module is able to configure a FortiManager device.
  • Examples include all parameters and values need to be adjusted to data sources before usage.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

FortiManager Version Compatibility


6.0.0 6.2.1 6.2.3 6.2.5 6.4.0 6.4.2 6.4.5 7.0.0 7.2.0
fsp_vlan_dynamicmapping_dhcpserver yes yes yes yes yes yes yes yes yes

Parameters

  • enable_log - Enable/Disable logging for task type: bool required: false default: False
  • forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0 type: str required: false
  • proposed_method - The overridden method for the underlying Json RPC request type: str required: false choices: set, update, add
  • bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters type: bool required: false default: False
  • workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode type: str required: false choices: global, custom adom including root
  • workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
  • rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
  • rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
  • adom - The parameter in requested url type: str required: true
  • vlan - The parameter in requested url type: str required: true
  • dynamic_mapping - The parameter in requested url type: str required: true
  • fsp_vlan_dynamicmapping_dhcpserver - no description type: dict
    • auto-configuration - No description for the parameter type: str choices: [disable, enable] more...
    • conflicted-ip-timeout - No description for the parameter type: int more...
    • ddns-auth - No description for the parameter type: str choices: [disable, tsig] more...
    • ddns-key - No description for the parameter type: str more...
    • ddns-keyname - No description for the parameter type: str more...
    • ddns-server-ip - No description for the parameter type: str more...
    • ddns-ttl - No description for the parameter type: int more...
    • ddns-update - No description for the parameter type: str choices: [disable, enable] more...
    • ddns-update-override - No description for the parameter type: str choices: [disable, enable] more...
    • ddns-zone - No description for the parameter type: str more...
    • default-gateway - No description for the parameter type: str more...
    • dns-server1 - No description for the parameter type: str more...
    • dns-server2 - No description for the parameter type: str more...
    • dns-server3 - No description for the parameter type: str more...
    • dns-service - No description for the parameter type: str choices: [default, specify, local] more...
    • domain - No description for the parameter type: str more...
    • enable - No description for the parameter type: str choices: [disable, enable] more...
    • exclude-range - No description for the parameter type: array more...
      • end-ip - No description for the parameter type: str more...
      • id - No description for the parameter type: int more...
      • start-ip - No description for the parameter type: str more...
    • filename - No description for the parameter type: str more...
    • forticlient-on-net-status - No description for the parameter type: str choices: [disable, enable] more...
    • id - No description for the parameter type: int more...
    • interface - No description for the parameter type: str more...
    • ip-mode - No description for the parameter type: str choices: [range, usrgrp] more...
    • ip-range - No description for the parameter type: array more...
      • end-ip - No description for the parameter type: str more...
      • id - No description for the parameter type: int more...
      • start-ip - No description for the parameter type: str more...
    • ipsec-lease-hold - No description for the parameter type: int more...
    • lease-time - No description for the parameter type: int more...
    • mac-acl-default-action - No description for the parameter type: str choices: [assign, block] more...
    • netmask - No description for the parameter type: str more...
    • next-server - No description for the parameter type: str more...
    • ntp-server1 - No description for the parameter type: str more...
    • ntp-server2 - No description for the parameter type: str more...
    • ntp-server3 - No description for the parameter type: str more...
    • ntp-service - No description for the parameter type: str choices: [default, specify, local] more...
    • option1 - No description for the parameter type: str more...
    • option2 - No description for the parameter type: str more...
    • option3 - No description for the parameter type: str more...
    • option4 - No description for the parameter type: str more...
    • option5 - No description for the parameter type: str more...
    • option6 - No description for the parameter type: str more...
    • options - No description for the parameter type: array more...
      • code - No description for the parameter type: int more...
      • id - No description for the parameter type: int more...
      • ip - No description for the parameter type: str more...
      • type - No description for the parameter type: str choices: [hex, string, ip, fqdn] more...
      • value - No description for the parameter type: str more...
    • reserved-address - No description for the parameter type: array more...
      • action - No description for the parameter type: str choices: [assign, block, reserved] more...
      • circuit-id - No description for the parameter type: str more...
      • circuit-id-type - No description for the parameter type: str choices: [hex, string] more...
      • description - No description for the parameter type: str more...
      • id - No description for the parameter type: int more...
      • ip - No description for the parameter type: str more...
      • mac - No description for the parameter type: str more...
      • remote-id - No description for the parameter type: str more...
      • remote-id-type - No description for the parameter type: str choices: [hex, string] more...
      • type - No description for the parameter type: str choices: [mac, option82] more...
    • server-type - No description for the parameter type: str choices: [regular, ipsec] more...
    • status - No description for the parameter type: str choices: [disable, enable] more...
    • tftp-server - No description for the parameter type: str more...
    • timezone - No description for the parameter type: str choices: [00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87] more...
    • timezone-option - No description for the parameter type: str choices: [disable, default, specify] more...
    • vci-match - No description for the parameter type: str choices: [disable, enable] more...
    • vci-string - No description for the parameter type: str more...
    • wifi-ac1 - No description for the parameter type: str more...
    • wifi-ac2 - No description for the parameter type: str more...
    • wifi-ac3 - No description for the parameter type: str more...
    • wins-server1 - No description for the parameter type: str more...
    • wins-server2 - No description for the parameter type: str more...
    • dns-server4 - No description for the parameter type: str more...
    • wifi-ac-service - No description for the parameter type: str choices: [specify, local] more...
    • auto-managed-status - No description for the parameter type: str choices: [disable, enable] more...
    • dhcp-settings-from-fortiipam - No description for the parameter type: str choices: [disable, enable] more...

Notes

Note

  • Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
  • To create or update an object, use state: present directive.
  • To delete an object, use state: absent directive
  • Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded

Examples

- hosts: fortimanager-inventory
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:
   - name: no description
     fmgr_fsp_vlan_dynamicmapping_dhcpserver:
        bypass_validation: False
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        rc_succeeded: [0, -2, -3, ...]
        rc_failed: [-2, -3, ...]
        adom: <your own value>
        vlan: <your own value>
        dynamic_mapping: <your own value>
        fsp_vlan_dynamicmapping_dhcpserver:
           auto-configuration: <value in [disable, enable]>
           conflicted-ip-timeout: <value of integer>
           ddns-auth: <value in [disable, tsig]>
           ddns-key: <value of string>
           ddns-keyname: <value of string>
           ddns-server-ip: <value of string>
           ddns-ttl: <value of integer>
           ddns-update: <value in [disable, enable]>
           ddns-update-override: <value in [disable, enable]>
           ddns-zone: <value of string>
           default-gateway: <value of string>
           dns-server1: <value of string>
           dns-server2: <value of string>
           dns-server3: <value of string>
           dns-service: <value in [default, specify, local]>
           domain: <value of string>
           enable: <value in [disable, enable]>
           exclude-range:
             -
                 end-ip: <value of string>
                 id: <value of integer>
                 start-ip: <value of string>
           filename: <value of string>
           forticlient-on-net-status: <value in [disable, enable]>
           id: <value of integer>
           interface: <value of string>
           ip-mode: <value in [range, usrgrp]>
           ip-range:
             -
                 end-ip: <value of string>
                 id: <value of integer>
                 start-ip: <value of string>
           ipsec-lease-hold: <value of integer>
           lease-time: <value of integer>
           mac-acl-default-action: <value in [assign, block]>
           netmask: <value of string>
           next-server: <value of string>
           ntp-server1: <value of string>
           ntp-server2: <value of string>
           ntp-server3: <value of string>
           ntp-service: <value in [default, specify, local]>
           option1: <value of string>
           option2: <value of string>
           option3: <value of string>
           option4: <value of string>
           option5: <value of string>
           option6: <value of string>
           options:
             -
                 code: <value of integer>
                 id: <value of integer>
                 ip: <value of string>
                 type: <value in [hex, string, ip, ...]>
                 value: <value of string>
           reserved-address:
             -
                 action: <value in [assign, block, reserved]>
                 circuit-id: <value of string>
                 circuit-id-type: <value in [hex, string]>
                 description: <value of string>
                 id: <value of integer>
                 ip: <value of string>
                 mac: <value of string>
                 remote-id: <value of string>
                 remote-id-type: <value in [hex, string]>
                 type: <value in [mac, option82]>
           server-type: <value in [regular, ipsec]>
           status: <value in [disable, enable]>
           tftp-server: <value of string>
           timezone: <value in [00, 01, 02, ...]>
           timezone-option: <value in [disable, default, specify]>
           vci-match: <value in [disable, enable]>
           vci-string: <value of string>
           wifi-ac1: <value of string>
           wifi-ac2: <value of string>
           wifi-ac3: <value of string>
           wins-server1: <value of string>
           wins-server2: <value of string>
           dns-server4: <value of string>
           wifi-ac-service: <value in [specify, local]>
           auto-managed-status: <value in [disable, enable]>
           dhcp-settings-from-fortiipam: <value in [disable, enable]>

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • request_url - The full url requested returned: always type: str sample: /sys/login/user
  • response_code - The status of api request returned: always type: int sample: 0
  • response_message - The descriptive message of the api response returned: always type: str sample: OK
  • response_data - The data body of the api response returned: optional type: list or dict

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Frank Shen (@fshen01)
  • Hongbin Lu (@fgtdev-hblu)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.