fortiswitch_user_radius – RADIUS server entry configuration in Fortinet’s FortiSwitch

New in version 1.0.0.

Synopsis

  • This module is able to configure a FortiSwitch device by allowing the user to set and modify user feature and radius category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v7.0.0

Requirements

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

  • ansible>=2.11

FortiSW Version Compatibility


v7.0.0 v7.0.1 v7.0.2 v7.0.3
fortiswitch_user_radius yes yes yes yes

Parameters

  • enable_log - Enable/Disable logging for task. type: bool required: false default: False
  • member_path - Member attribute path to operate on. type: str
  • member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
  • state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
  • user_radius - RADIUS server entry configuration. type: dict
    • acct_fast_framedip_detect - Time in seconds ( ) for Accounting message Framed-IP detection from DHCP Snooping. type: int
    • acct_interim_interval - Time in seconds ( ) between each accounting interim update message. type: int
    • acct_server - Additional accounting servers. type: list member_path: acct_server:id
      • id - ID (0 - 4294967295). type: int required: true
      • port - RADIUS accounting port number. type: int
      • secret - Secret key. type: str
      • server - Server IP address. type: str
      • status - Enable/disable Status. type: str choices: enable, disable
    • addr_mode - Address mode (IPv4 or IPv6). type: str choices: ipv4, ipv6
    • all_usergroup - Enable/disable automatic inclusion of this RADIUS server to all user groups. type: str choices: disable, enable
    • auth_type - Authentication protocol. type: str choices: auto, ms_chap_v2, ms_chap, chap, pap
    • frame_mtu_size - Frame MTU Size. type: int
    • link_monitor - Enable/disable RADIUS link-monitor service from this server. type: str choices: disable, enable
    • link_monitor_interval - Time in seconds ( ) for the link-monitor interval type: int
    • name - RADIUS server entry name. type: str required: true
    • nas_ip - NAS IPv4 for the RADIUS request. type: str
    • nas_ip6 - NAS IPv6 for the RADIUS request. type: str
    • radius_coa - Enable/disable RADIUS CoA services from this server. type: str choices: disable, enable
    • radius_coa_secret - Secret key to access the local Radius CoA server. type: str
    • radius_port - Local RADIUS service port number. type: int
    • secondary_secret - Secret key to access the secondary server. type: str
    • secondary_server - Secondary RADIUS domain name or IP address. type: str
    • secret - Secret key to access the primary server. type: str
    • server - Primary server domain name or IP address. type: str
    • service_type - Radius Service Type. type: str choices: login, framed, callback-login, callback-framed, outbound, administrative, nas-prompt, authenticate-only, callback-nas-prompt, call-check, callback-administrative
    • source_ip - Source IPv4 for communications to RADIUS server. type: str
    • source_ip6 - Source IPv6 for communications to RADIUS server. type: str

Examples

- hosts: fortiswitch01
  collections:
    - fortinet.fortiswitch
  connection: httpapi
  vars:
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: RADIUS server entry configuration.
    fortiswitch_user_radius:
      state: "present"
      user_radius:
        acct_fast_framedip_detect: "3"
        acct_interim_interval: "4"
        acct_server:
         -
            id:  "6"
            port: "7"
            secret: "<your_own_value>"
            server: "192.168.100.40"
            status: "enable"
        addr_mode: "ipv4"
        all_usergroup: "disable"
        auth_type: "auto"
        frame_mtu_size: "14"
        link_monitor: "disable"
        link_monitor_interval: "16"
        name: "default_name_17"
        nas_ip: "<your_own_value>"
        nas_ip6: "<your_own_value>"
        radius_coa: "disable"
        radius_coa_secret: "<your_own_value>"
        radius_port: "22"
        secondary_secret: "<your_own_value>"
        secondary_server: "<your_own_value>"
        secret: "<your_own_value>"
        server: "192.168.100.40"
        service_type: "login"
        source_ip: "84.230.14.43"
        source_ip6: "<your_own_value>"

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:

  • build - Build number of the fortiSwitch image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiSwitch returned: always type: str sample: PUT
  • http_status - Last result given by FortiSwitch on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiSwitch returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • serial - Serial number of the unit returned: always type: str sample: FS1D243Z13000122
  • status - Indication of the operation's result returned: always type: str sample: success
  • version - Version of the FortiSwitch returned: always type: str sample: v7.0.0

Status

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

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)

Hint

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