fortinet.fortimanager.fmgr_router_routemap_rule (2.4.0) — module

Rule.

| "added in version" 2.1.0 of fortinet.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 fortinet.fortimanager:==2.4.0


Add to requirements.yml

  collections:
    - name: fortinet.fortimanager
      version: 2.4.0

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.
- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Rule.
      fortinet.fortimanager.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: present # <value in [present, absent]>
        router_routemap_rule:
          action: <value in [permit, deny]>
          id: <integer>
          match_as_path: <string>
          match_community: <string>
          match_community_exact: <value in [disable, enable]>
          match_flags: <integer>
          match_interface: <string>
          match_ip_address: <string>
          match_ip_nexthop: <string>
          match_ip6_address: <string>
          match_ip6_nexthop: <string>
          match_metric: <string>
          match_origin: <value in [none, egp, igp, ...]>
          match_route_type: <value in [1, 2, none, ...]>
          match_tag: <string>
          match_vrf: <integer>
          set_aggregator_as: <integer>
          set_aggregator_ip: <string>
          set_aspath: <list or string>
          set_aspath_action: <value in [prepend, replace]>
          set_atomic_aggregate: <value in [disable, enable]>
          set_community: <list or string>
          set_community_additive: <value in [disable, enable]>
          set_community_delete: <string>
          set_dampening_max_suppress: <integer>
          set_dampening_reachability_half_life: <integer>
          set_dampening_reuse: <integer>
          set_dampening_suppress: <integer>
          set_dampening_unreachability_half_life: <integer>
          set_extcommunity_rt: <list or string>
          set_extcommunity_soo: <list or string>
          set_flags: <integer>
          set_ip_nexthop: <string>
          set_ip6_nexthop: <string>
          set_ip6_nexthop_local: <string>
          set_local_preference: <string>
          set_metric: <string>
          set_metric_type: <value in [1, 2, none, ...]>
          set_origin: <value in [none, egp, igp, ...]>
          set_originator_id: <string>
          set_priority: <integer>
          set_route_tag: <string>
          set_tag: <string>
          set_weight: <string>
          match_extcommunity: <string>
          match_extcommunity_exact: <value in [disable, enable]>
          set_ip_prefsrc: <string>
          set_vpnv4_nexthop: <string>
          set_vpnv6_nexthop: <string>
          set_vpnv6_nexthop_local: <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
    type: list

route-map:
    description: Deprecated, please use "route_map"
    type: str

route_map:
    description: The parameter (route-map) in requested url.
    type: str

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

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

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

proposed_method:
    choices:
    - update
    - set
    - add
    description: The overridden method for the underlying Json RPC request.
    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.
    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.
        required: true
        type: int
      match-as-path:
        description: Deprecated, please rename it to match_as_path. Match BGP AS path
          list.
        type: str
      match-community:
        description: Deprecated, please rename it to match_community. Match BGP community
          list.
        type: str
      match-community-exact:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to match_community_exact. Enable/disable
          exact matching of communities.
        type: str
      match-extcommunity:
        description: Deprecated, please rename it to match_extcommunity. Match BGP extended
          community list.
        type: str
      match-extcommunity-exact:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to match_extcommunity_exact. Enable/disable
          exact matching of extended communities.
        type: str
      match-flags:
        description: Deprecated, please rename it to match_flags.
        type: int
      match-interface:
        description: Deprecated, please rename it to match_interface. Match interface
          configuration.
        type: str
      match-ip-address:
        description: Deprecated, please rename it to match_ip_address. Match IP address
          permitted by access-list or prefix-list.
        type: str
      match-ip-nexthop:
        description: Deprecated, please rename it to match_ip_nexthop. Match next hop
          IP address passed by access-list or prefix-list.
        type: str
      match-ip6-address:
        description: Deprecated, please rename it to match_ip6_address. Match IPv6 address
          permitted by access-list6 or prefix-list6.
        type: str
      match-ip6-nexthop:
        description: Deprecated, please rename it to match_ip6_nexthop. Match next hop
          IPv6 address passed by access-list6 or prefix-list6.
        type: str
      match-metric:
        description: Deprecated, please rename it to match_metric. Match metric for redistribute
          routes.
        type: str
      match-origin:
        choices:
        - none
        - egp
        - igp
        - incomplete
        description: Deprecated, please rename it to match_origin. Match BGP origin code.
        type: str
      match-route-type:
        choices:
        - '1'
        - '2'
        - none
        - external-type1
        - external-type2
        description: Deprecated, please rename it to match_route_type. Match route type.
        type: str
      match-tag:
        description: Deprecated, please rename it to match_tag. Match tag.
        type: str
      match-vrf:
        description: Deprecated, please rename it to match_vrf. Match VRF ID.
        type: int
      set-aggregator-as:
        description: Deprecated, please rename it to set_aggregator_as. BGP aggregator
          AS.
        type: int
      set-aggregator-ip:
        description: Deprecated, please rename it to set_aggregator_ip. BGP aggregator
          IP.
        type: str
      set-aspath:
        description: (list) Deprecated, please rename it to set_aspath.
        type: raw
      set-aspath-action:
        choices:
        - prepend
        - replace
        description: Deprecated, please rename it to set_aspath_action. Specify preferred
          action of set-aspath.
        type: str
      set-atomic-aggregate:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to set_atomic_aggregate. Enable/disable
          BGP atomic aggregate attribute.
        type: str
      set-community:
        description: (list) Deprecated, please rename it to set_community.
        type: raw
      set-community-additive:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to set_community_additive. Enable/disable
          adding set-community to existing community.
        type: str
      set-community-delete:
        description: Deprecated, please rename it to set_community_delete. Delete communities
          matching community list.
        type: str
      set-dampening-max-suppress:
        description: Deprecated, please rename it to set_dampening_max_suppress. Maximum
          duration to suppress a route
        type: int
      set-dampening-reachability-half-life:
        description: Deprecated, please rename it to set_dampening_reachability_half_life.
          Reachability half-life time for the penalty
        type: int
      set-dampening-reuse:
        description: Deprecated, please rename it to set_dampening_reuse. Value to start
          reusing a route
        type: int
      set-dampening-suppress:
        description: Deprecated, please rename it to set_dampening_suppress. Value to
          start suppressing a route
        type: int
      set-dampening-unreachability-half-life:
        description: Deprecated, please rename it to set_dampening_unreachability_half_life.
          Unreachability Half-life time for the penalty
        type: int
      set-extcommunity-rt:
        description: (list) Deprecated, please rename it to set_extcommunity_rt.
        type: raw
      set-extcommunity-soo:
        description: (list) Deprecated, please rename it to set_extcommunity_soo.
        type: raw
      set-flags:
        description: Deprecated, please rename it to set_flags.
        type: int
      set-ip-nexthop:
        description: Deprecated, please rename it to set_ip_nexthop. IP address of next
          hop.
        type: str
      set-ip-prefsrc:
        description: Deprecated, please rename it to set_ip_prefsrc. IP address of preferred
          source.
        type: str
      set-ip6-nexthop:
        description: Deprecated, please rename it to set_ip6_nexthop. IPv6 global address
          of next hop.
        type: str
      set-ip6-nexthop-local:
        description: Deprecated, please rename it to set_ip6_nexthop_local. IPv6 local
          address of next hop.
        type: str
      set-local-preference:
        description: Deprecated, please rename it to set_local_preference. BGP local preference
          path attribute.
        type: str
      set-metric:
        description: Deprecated, please rename it to set_metric. Metric value.
        type: str
      set-metric-type:
        choices:
        - '1'
        - '2'
        - none
        - external-type1
        - external-type2
        description: Deprecated, please rename it to set_metric_type. Metric type.
        type: str
      set-origin:
        choices:
        - none
        - egp
        - igp
        - incomplete
        description: Deprecated, please rename it to set_origin. BGP origin code.
        type: str
      set-originator-id:
        description: Deprecated, please rename it to set_originator_id. BGP originator
          ID attribute.
        type: str
      set-priority:
        description: Deprecated, please rename it to set_priority. Priority for routing
          table.
        type: int
      set-route-tag:
        description: Deprecated, please rename it to set_route_tag. Route tag for routing
          table.
        type: str
      set-tag:
        description: Deprecated, please rename it to set_tag. Tag value.
        type: str
      set-vpnv4-nexthop:
        description: Deprecated, please rename it to set_vpnv4_nexthop. IP address of
          VPNv4 next-hop.
        type: str
      set-vpnv6-nexthop:
        description: Deprecated, please rename it to set_vpnv6_nexthop. IPv6 global address
          of VPNv6 next-hop.
        type: str
      set-vpnv6-nexthop-local:
        description: Deprecated, please rename it to set_vpnv6_nexthop_local. IPv6 link-local
          address of VPNv6 next-hop.
        type: str
      set-weight:
        description: Deprecated, please rename it to set_weight. 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.
    type: str

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

workspace_locking_timeout:
    default: 300
    description: The maximum time in seconds to wait for other user to release the workspace
      lock.
    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