drmofu.fortimanager.fmgr_router_routemap_rule (2.2.2) — module

Rule.

| "added in version" 2.1.6 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: Rule.
      fmgr_router_routemap_rule:
         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>
         route-map: <your own value>
         state: <value in [present, absent]>
         router_routemap_rule:
            action: <value in [permit, deny]>
            id: <value of integer>
            match-as-path: <value of string>
            match-community: <value of string>
            match-community-exact: <value in [disable, enable]>
            match-flags: <value of integer>
            match-interface: <value of string>
            match-ip-address: <value of string>
            match-ip-nexthop: <value of string>
            match-ip6-address: <value of string>
            match-ip6-nexthop: <value of string>
            match-metric: <value of string>
            match-origin: <value in [none, egp, igp, ...]>
            match-route-type: <value in [1, 2, none, ...]>
            match-tag: <value of string>
            match-vrf: <value of integer>
            set-aggregator-as: <value of integer>
            set-aggregator-ip: <value of string>
            set-aspath: <value of string>
            set-aspath-action: <value in [prepend, replace]>
            set-atomic-aggregate: <value in [disable, enable]>
            set-community: <value of string>
            set-community-additive: <value in [disable, enable]>
            set-community-delete: <value of string>
            set-dampening-max-suppress: <value of integer>
            set-dampening-reachability-half-life: <value of integer>
            set-dampening-reuse: <value of integer>
            set-dampening-suppress: <value of integer>
            set-dampening-unreachability-half-life: <value of integer>
            set-extcommunity-rt: <value of string>
            set-extcommunity-soo: <value of string>
            set-flags: <value of integer>
            set-ip-nexthop: <value of string>
            set-ip6-nexthop: <value of string>
            set-ip6-nexthop-local: <value of string>
            set-local-preference: <value of string>
            set-metric: <value of string>
            set-metric-type: <value in [1, 2, none, ...]>
            set-origin: <value in [none, egp, igp, ...]>
            set-originator-id: <value of string>
            set-priority: <value of integer>
            set-route-tag: <value of string>
            set-tag: <value of string>
            set-weight: <value of string>
            match-extcommunity: <value of string>
            match-extcommunity-exact: <value in [disable, enable]>
            set-ip-prefsrc: <value of string>

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

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

route-map:
    description: the parameter (route-map) in requested url
    required: true
    type: str

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

router_routemap_rule:
    description: the top level parameters set
    required: false
    suboptions:
      action:
        choices:
        - permit
        - deny
        description: Action.
        type: str
      id:
        description: Rule ID.
        type: int
      match-as-path:
        description: Match BGP AS path list.
        type: str
      match-community:
        description: Match BGP community list.
        type: str
      match-community-exact:
        choices:
        - disable
        - enable
        description: Enable/disable exact matching of communities.
        type: str
      match-extcommunity:
        description: Match BGP extended community list.
        type: str
      match-extcommunity-exact:
        choices:
        - disable
        - enable
        description: Enable/disable exact matching of extended communities.
        type: str
      match-flags:
        description: no description
        type: int
      match-interface:
        description: Match interface configuration.
        type: str
      match-ip-address:
        description: Match IP address permitted by access-list or prefix-list.
        type: str
      match-ip-nexthop:
        description: Match next hop IP address passed by access-list or prefix-list.
        type: str
      match-ip6-address:
        description: Match IPv6 address permitted by access-list6 or prefix-list6.
        type: str
      match-ip6-nexthop:
        description: Match next hop IPv6 address passed by access-list6 or prefix-list6.
        type: str
      match-metric:
        description: Match metric for redistribute routes.
        type: str
      match-origin:
        choices:
        - none
        - egp
        - igp
        - incomplete
        description: Match BGP origin code.
        type: str
      match-route-type:
        choices:
        - '1'
        - '2'
        - none
        - external-type1
        - external-type2
        description: Match route type.
        type: str
      match-tag:
        description: Match tag.
        type: str
      match-vrf:
        description: Match VRF ID.
        type: int
      set-aggregator-as:
        description: BGP aggregator AS.
        type: int
      set-aggregator-ip:
        description: BGP aggregator IP.
        type: str
      set-aspath:
        description: description
        type: str
      set-aspath-action:
        choices:
        - prepend
        - replace
        description: Specify preferred action of set-aspath.
        type: str
      set-atomic-aggregate:
        choices:
        - disable
        - enable
        description: Enable/disable BGP atomic aggregate attribute.
        type: str
      set-community:
        description: description
        type: str
      set-community-additive:
        choices:
        - disable
        - enable
        description: Enable/disable adding set-community to existing community.
        type: str
      set-community-delete:
        description: Delete communities matching community list.
        type: str
      set-dampening-max-suppress:
        description: Maximum duration to suppress a route
        type: int
      set-dampening-reachability-half-life:
        description: Reachability half-life time for the penalty
        type: int
      set-dampening-reuse:
        description: Value to start reusing a route
        type: int
      set-dampening-suppress:
        description: Value to start suppressing a route
        type: int
      set-dampening-unreachability-half-life:
        description: Unreachability Half-life time for the penalty
        type: int
      set-extcommunity-rt:
        description: description
        type: str
      set-extcommunity-soo:
        description: description
        type: str
      set-flags:
        description: no description
        type: int
      set-ip-nexthop:
        description: IP address of next hop.
        type: str
      set-ip-prefsrc:
        description: IP address of preferred source.
        type: str
      set-ip6-nexthop:
        description: IPv6 global address of next hop.
        type: str
      set-ip6-nexthop-local:
        description: IPv6 local address of next hop.
        type: str
      set-local-preference:
        description: BGP local preference path attribute.
        type: str
      set-metric:
        description: Metric value.
        type: str
      set-metric-type:
        choices:
        - '1'
        - '2'
        - none
        - external-type1
        - external-type2
        description: Metric type.
        type: str
      set-origin:
        choices:
        - none
        - egp
        - igp
        - incomplete
        description: BGP origin code.
        type: str
      set-originator-id:
        description: BGP originator ID attribute.
        type: str
      set-priority:
        description: Priority for routing table.
        type: int
      set-route-tag:
        description: Route tag for routing table.
        type: str
      set-tag:
        description: Tag value.
        type: str
      set-weight:
        description: BGP weight for routing table.
        type: str
    type: dict

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

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