drmofu.fortimanager.fmgr_wanprof_system_virtualwanlink_service (2.2.2) — module

Create SD-WAN rules or priority rules

| "added in version" 2.0.0 of drmofu.fortimanager"

Authors: Xinwei Du (@dux-fortinet), Xing Li (@lix-fortinet), Jie Xue (@JieX19), Link Zheng (@chillancezen), Frank Shen (@fshen01), Hongbin Lu (@fgtdev-hblu)

preview | supported by community

Install collection

Install with ansible-galaxy collection install drmofu.fortimanager:==2.2.2


Add to requirements.yml

  collections:
    - name: drmofu.fortimanager
      version: 2.2.2

Description

This module is able to configure a FortiManager device.

Examples include all parameters and values which need to be adjusted to data sources before usage.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
 - 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: Create SD-WAN rules or priority rules
      fmgr_wanprof_system_virtualwanlink_service:
         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>
         wanprof: <your own value>
         state: <value in [present, absent]>
         wanprof_system_virtualwanlink_service:
            addr-mode: <value in [ipv4, ipv6]>
            bandwidth-weight: <value of integer>
            default: <value in [disable, enable]>
            dscp-forward: <value in [disable, enable]>
            dscp-forward-tag: <value of string>
            dscp-reverse: <value in [disable, enable]>
            dscp-reverse-tag: <value of string>
            dst: <value of string>
            dst-negate: <value in [disable, enable]>
            dst6: <value of string>
            end-port: <value of integer>
            gateway: <value in [disable, enable]>
            groups: <value of string>
            health-check: <value of string>
            hold-down-time: <value of integer>
            id: <value of integer>
            internet-service: <value in [disable, enable]>
            internet-service-ctrl: <value of integer>
            internet-service-ctrl-group: <value of string>
            internet-service-custom: <value of string>
            internet-service-custom-group: <value of string>
            internet-service-group: <value of string>
            internet-service-id: <value of string>
            jitter-weight: <value of integer>
            latency-weight: <value of integer>
            link-cost-factor: <value in [latency, jitter, packet-loss, ...]>
            link-cost-threshold: <value of integer>
            member: <value of string>
            mode: <value in [auto, manual, priority, ...]>
            name: <value of string>
            packet-loss-weight: <value of integer>
            priority-members: <value of string>
            protocol: <value of integer>
            quality-link: <value of integer>
            route-tag: <value of integer>
            sla:
              -
                  health-check: <value of string>
                  id: <value of integer>
            src: <value of string>
            src-negate: <value in [disable, enable]>
            src6: <value of string>
            start-port: <value of integer>
            status: <value in [disable, enable]>
            tos: <value of string>
            tos-mask: <value of string>
            users: <value of string>
            internet-service-app-ctrl: <value of integer>
            internet-service-app-ctrl-group: <value of string>
            role: <value in [primary, secondary, standalone]>
            sla-compare-method: <value in [order, number]>
            standalone-action: <value in [disable, enable]>
            input-device: <value of string>
            internet-service-name: <value of string>
            input-device-negate: <value in [disable, enable]>

Inputs

    
adom:
    description: the parameter (adom) in requested url
    required: true
    type: str

state:
    choices:
    - present
    - absent
    description: The directive to create, update or delete an object.
    required: true
    type: str

wanprof:
    description: the parameter (wanprof) in requested url
    required: true
    type: str

rc_failed:
    description: The rc codes list with which the conditions to fail will be overriden.
    elements: int
    required: false
    type: list

enable_log:
    default: false
    description: Enable/Disable logging for task.
    required: false
    type: bool

access_token:
    description: The token to access FortiManager without using username and password.
    required: false
    type: str

rc_succeeded:
    description: The rc codes list with which the conditions to succeed will be overriden.
    elements: int
    required: false
    type: list

proposed_method:
    choices:
    - update
    - set
    - add
    description: The overridden method for the underlying Json RPC request.
    required: false
    type: str

bypass_validation:
    default: false
    description: Only set to True when module schema diffs with FortiManager API structure,
      module continues to execute without validating parameters.
    required: false
    type: bool

workspace_locking_adom:
    description: The adom to lock for FortiManager running in workspace mode, the value
      can be global and others including root.
    required: false
    type: str

forticloud_access_token:
    description: Authenticate Ansible client with forticloud API access token.
    required: false
    type: str

workspace_locking_timeout:
    default: 300
    description: The maximum time in seconds to wait for other user to release the workspace
      lock.
    required: false
    type: int

wanprof_system_virtualwanlink_service:
    description: the top level parameters set
    required: false
    suboptions:
      addr-mode:
        choices:
        - ipv4
        - ipv6
        description: Address mode
        type: str
      bandwidth-weight:
        description: Coefficient of reciprocal of available bidirectional bandwidth in
          the formula of custom-profile-1.
        type: int
      default:
        choices:
        - disable
        - enable
        description: Enable/disable use of SD-WAN as default service.
        type: str
      dscp-forward:
        choices:
        - disable
        - enable
        description: Enable/disable forward traffic DSCP tag.
        type: str
      dscp-forward-tag:
        description: Forward traffic DSCP tag.
        type: str
      dscp-reverse:
        choices:
        - disable
        - enable
        description: Enable/disable reverse traffic DSCP tag.
        type: str
      dscp-reverse-tag:
        description: Reverse traffic DSCP tag.
        type: str
      dst:
        description: Destination address name.
        type: str
      dst-negate:
        choices:
        - disable
        - enable
        description: Enable/disable negation of destination address match.
        type: str
      dst6:
        description: Destination address6 name.
        type: str
      end-port:
        description: End destination port number.
        type: int
      gateway:
        choices:
        - disable
        - enable
        description: Enable/disable SD-WAN service gateway.
        type: str
      groups:
        description: User groups.
        type: str
      health-check:
        description: Health check.
        type: str
      hold-down-time:
        description: Waiting period in seconds when switching from the back-up member
          to the primary member
        type: int
      id:
        description: Priority rule ID
        type: int
      input-device:
        description: Source interface name.
        type: str
      input-device-negate:
        choices:
        - disable
        - enable
        description: Enable/disable negation of input device match.
        type: str
      internet-service:
        choices:
        - disable
        - enable
        description: Enable/disable use of Internet service for application-based load
          balancing.
        type: str
      internet-service-app-ctrl:
        description: description
        type: int
      internet-service-app-ctrl-group:
        description: Application control based Internet Service group list.
        type: str
      internet-service-ctrl:
        description: description
        type: int
      internet-service-ctrl-group:
        description: Control-based Internet Service group list.
        type: str
      internet-service-custom:
        description: Custom Internet service name list.
        type: str
      internet-service-custom-group:
        description: Custom Internet Service group list.
        type: str
      internet-service-group:
        description: Internet Service group list.
        type: str
      internet-service-id:
        description: Internet service ID list.
        type: str
      internet-service-name:
        description: Internet service name list.
        type: str
      jitter-weight:
        description: Coefficient of jitter in the formula of custom-profile-1.
        type: int
      latency-weight:
        description: Coefficient of latency in the formula of custom-profile-1.
        type: int
      link-cost-factor:
        choices:
        - latency
        - jitter
        - packet-loss
        - inbandwidth
        - outbandwidth
        - bibandwidth
        - custom-profile-1
        description: Link cost factor.
        type: str
      link-cost-threshold:
        description: Percentage threshold change of link cost values that will result
          in policy route regeneration
        type: int
      member:
        description: Member sequence number.
        type: str
      mode:
        choices:
        - auto
        - manual
        - priority
        - sla
        - load-balance
        description: Control how the priority rule sets the priority of interfaces in
          the SD-WAN.
        type: str
      name:
        description: Priority rule name.
        type: str
      packet-loss-weight:
        description: Coefficient of packet-loss in the formula of custom-profile-1.
        type: int
      priority-members:
        description: Member sequence number list.
        type: str
      protocol:
        description: Protocol number.
        type: int
      quality-link:
        description: Quality grade.
        type: int
      role:
        choices:
        - primary
        - secondary
        - standalone
        description: Service role to work with neighbor.
        type: str
      route-tag:
        description: IPv4 route map route-tag.
        type: int
      sla:
        description: description
        elements: dict
        suboptions:
          health-check:
            description: Virtual WAN Link health-check.
            type: str
          id:
            description: SLA ID.
            type: int
        type: list
      sla-compare-method:
        choices:
        - order
        - number
        description: Method to compare SLA value for sla and load balance mode.
        type: str
      src:
        description: Source address name.
        type: str
      src-negate:
        choices:
        - disable
        - enable
        description: Enable/disable negation of source address match.
        type: str
      src6:
        description: Source address6 name.
        type: str
      standalone-action:
        choices:
        - disable
        - enable
        description: Enable/disable service when selected neighbor role is standalone
          while service role is not standalone.
        type: str
      start-port:
        description: Start destination port number.
        type: int
      status:
        choices:
        - disable
        - enable
        description: Enable/disable SD-WAN service.
        type: str
      tos:
        description: Type of service bit pattern.
        type: str
      tos-mask:
        description: Type of service evaluated bits.
        type: str
      users:
        description: User name.
        type: str
    type: dict

Outputs

meta:
  contains:
    request_url:
      description: The full url requested.
      returned: always
      sample: /sys/login/user
      type: str
    response_code:
      description: The status of api request.
      returned: always
      sample: 0
      type: int
    response_data:
      description: The api response.
      returned: always
      type: list
    response_message:
      description: The descriptive message of the api response.
      returned: always
      sample: OK.
      type: str
    system_information:
      description: The information of the target system.
      returned: always
      type: dict
  description: The result of the request.
  returned: always
  type: dict
rc:
  description: The status the request.
  returned: always
  sample: 0
  type: int
version_check_warning:
  description: Warning if the parameters used in the playbook are not supported by
    the current FortiManager version.
  returned: complex
  type: list