drmofu.fortimanager.fmgr_move (2.2.2) — module

Move fortimanager defined Object.

| "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: fortimanager01
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: True
    ansible_httpapi_validate_certs: False
    ansible_httpapi_port: 443
  tasks:
    - name: Move a firewall vip object
      fmgr_move:
        move:
          selector: "firewall_vip"
          target: "ansible-test-vip_first"
          action: "before"
          self:
            adom: "root"
            vip: "ansible-test-vip_second"

Inputs

    
move:
    description: Reorder Two Objects.
    required: true
    suboptions:
      action:
        choices:
        - after
        - before
        description: Direction to indicate where to move an object entry.
        required: true
        type: str
      selector:
        choices:
        - apcfgprofile_commandlist
        - application_casi_profile_entries
        - application_list_defaultnetworkservices
        - application_list_entries
        - application_list_entries_parameters
        - bonjourprofile_policylist
        - cifs_profile_filefilter_entries
        - dlp_dictionary_entries
        - dlp_filepattern_entries
        - dlp_profile_rule
        - dlp_sensor_entries
        - dlp_sensor_filter
        - dnsfilter_domainfilter_entries
        - dnsfilter_urlfilter_entries
        - emailfilter_blockallowlist_entries
        - emailfilter_bwl_entries
        - emailfilter_bword_entries
        - emailfilter_profile_filefilter_entries
        - endpointcontrol_fctems
        - extendercontroller_extenderprofile_cellular_smsnotification_receiver
        - extendercontroller_extenderprofile_lanextension_backhaul
        - extensioncontroller_extenderprofile_cellular_smsnotification_receiver
        - extensioncontroller_extenderprofile_lanextension_backhaul
        - filefilter_profile_rules
        - firewall_accessproxy
        - firewall_accessproxy6
        - firewall_accessproxyvirtualhost
        - firewall_carrierendpointbwl_entries
        - firewall_identitybasedroute
        - firewall_profileprotocoloptions_cifs_filefilter_entries
        - firewall_service_category
        - firewall_service_custom
        - firewall_shapingprofile_shapingentries
        - firewall_vip
        - firewall_vip6
        - ips_sensor_entries
        - ips_sensor_filter
        - mpskprofile_mpskgroup
        - mpskprofile_mpskgroup_mpskkey
        - pkg_authentication_rule
        - pkg_central_dnat
        - pkg_central_dnat6
        - pkg_firewall_acl
        - pkg_firewall_acl6
        - pkg_firewall_centralsnatmap
        - pkg_firewall_consolidated_policy
        - pkg_firewall_dospolicy
        - pkg_firewall_dospolicy6
        - pkg_firewall_explicitproxypolicy
        - pkg_firewall_explicitproxypolicy_identitybasedpolicy
        - pkg_firewall_hyperscalepolicy
        - pkg_firewall_hyperscalepolicy46
        - pkg_firewall_hyperscalepolicy6
        - pkg_firewall_hyperscalepolicy64
        - pkg_firewall_interfacepolicy
        - pkg_firewall_interfacepolicy6
        - pkg_firewall_localinpolicy
        - pkg_firewall_localinpolicy6
        - pkg_firewall_multicastpolicy
        - pkg_firewall_multicastpolicy6
        - pkg_firewall_policy
        - pkg_firewall_policy46
        - pkg_firewall_policy6
        - pkg_firewall_policy64
        - pkg_firewall_proxypolicy
        - pkg_firewall_securitypolicy
        - pkg_firewall_shapingpolicy
        - pkg_user_nacpolicy
        - pm_config_pblock_firewall_consolidated_policy
        - pm_config_pblock_firewall_policy
        - pm_config_pblock_firewall_policy6
        - pm_config_pblock_firewall_securitypolicy
        - spamfilter_bwl_entries
        - spamfilter_bword_entries
        - sshfilter_profile_filefilter_entries
        - sshfilter_profile_shellcommands
        - switchcontroller_dynamicportpolicy_policy
        - switchcontroller_managedswitch
        - system_sdnconnector_compartmentlist
        - system_sdnconnector_externalaccountlist
        - system_sdnconnector_externalip
        - system_sdnconnector_forwardingrule
        - system_sdnconnector_gcpprojectlist
        - system_sdnconnector_nic
        - system_sdnconnector_nic_ip
        - system_sdnconnector_ociregionlist
        - system_sdnconnector_route
        - system_sdnconnector_routetable
        - system_sdnconnector_routetable_route
        - user_deviceaccesslist_devicelist
        - vap_vlanname
        - videofilter_profile_fortiguardcategory_filters
        - videofilter_youtubechannelfilter_entries
        - vpn_ipsec_fec_mappings
        - vpn_ssl_settings_authenticationrule
        - vpnsslweb_portal_bookmarkgroup
        - vpnsslweb_portal_bookmarkgroup_bookmarks
        - vpnsslweb_portal_splitdns
        - wanprof_system_sdwan_members
        - wanprof_system_sdwan_service
        - wanprof_system_sdwan_service_sla
        - wanprof_system_sdwan_zone
        - wanprof_system_virtualwanlink_members
        - wanprof_system_virtualwanlink_service
        - wanprof_system_virtualwanlink_service_sla
        - webfilter_contentheader_entries
        - webfilter_profile_filefilter_entries
        - webfilter_urlfilter_entries
        - wireless_accesscontrollist_layer3ipv4rules
        - wireless_accesscontrollist_layer3ipv6rules
        description: Selector of the move object.
        required: true
        type: str
      self:
        description: The parameter for each selector.
        required: true
        type: dict
      target:
        description: Key to the target entry.
        required: true
        type: str
    type: dict

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

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: Access token of forticloud managed API users, this option is available
      with FortiManager later than 6.4.0.
    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