drmofu.fortianalyzer.faz_rename (1.3.0) — module

Rename an object in FortiAnalyzer.

| "added in version" 1.0.0 of drmofu.fortianalyzer"

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

preview | supported by community

Install collection

Install with ansible-galaxy collection install drmofu.fortianalyzer:==1.3.0


Add to requirements.yml

  collections:
    - name: drmofu.fortianalyzer
      version: 1.3.0

Description

This module is able to configure a FortiAnalyzer device by renaming an object.

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.
- collections:
    - fortinet.fortianalyzer
  connection: httpapi
  hosts: fortianalyzer_inventory
  tasks:
    - faz_dvmdb_group:
        adom: root
        dvmdb_group:
          # desc: <value of string>
          # meta fields: <value of dict>
          name: foogroup
          os_type: unknown
          type: normal
        state: present
      name: Device group table.

    - faz_rename:
        rename:
          selector: dvmdb_group
          self:
            adom: root
            group: foogroup
          target:
            name: "foogroup_renamed"

    - faz_fact:
        facts:
          selector: dvmdb_group
          params:
            adom: root
            group: foogroup
      register: info
      failed_when: info.rc == 0

    - faz_dvmdb_group:
        adom: root
        state: absent
        dvmdb_group:
          name: foogroup_renamed

  vars:
    ansible_httpapi_port: 443
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false

Inputs

    
rename:
    description: The top level parameters set.
    required: true
    suboptions:
      selector:
        choices:
        - cli_fmupdate_fdssetting_pushoverridetoclient_announceip
        - cli_fmupdate_fdssetting_serveroverride_servlist
        - cli_fmupdate_serveraccesspriorities_privateserver
        - cli_fmupdate_webspam_fgdsetting_serveroverride_servlist
        - cli_system_admin_group
        - cli_system_admin_group_member
        - cli_system_admin_ldap
        - cli_system_admin_radius
        - cli_system_admin_tacacs
        - cli_system_admin_user
        - cli_system_admin_user_adom
        - cli_system_admin_user_adomexclude
        - cli_system_admin_user_dashboard
        - cli_system_admin_user_dashboardtabs
        - cli_system_admin_user_metadata
        - cli_system_admin_user_policypackage
        - cli_system_admin_user_restrictdevvdom
        - cli_system_alertevent
        - cli_system_certificate_ca
        - cli_system_certificate_crl
        - cli_system_certificate_local
        - cli_system_certificate_remote
        - cli_system_certificate_ssh
        - cli_system_csf_trustedlist
        - cli_system_ha_peer
        - cli_system_ha_privatepeer
        - cli_system_ha_vip
        - cli_system_interface
        - cli_system_localinpolicy
        - cli_system_localinpolicy6
        - cli_system_log_devicedisable
        - cli_system_log_maildomain
        - cli_system_log_ratelimit_device
        - cli_system_log_ratelimit_ratelimits
        - cli_system_logfetch_clientprofile
        - cli_system_logfetch_clientprofile_devicefilter
        - cli_system_logfetch_clientprofile_logfilter
        - cli_system_logforward
        - cli_system_logforward_devicefilter
        - cli_system_logforward_logfieldexclusion
        - cli_system_logforward_logfilter
        - cli_system_logforward_logmaskingcustom
        - cli_system_mail
        - cli_system_metadata_admins
        - cli_system_ntp_ntpserver
        - cli_system_report_group
        - cli_system_route
        - cli_system_route6
        - cli_system_saml_fabricidp
        - cli_system_saml_serviceproviders
        - cli_system_sniffer
        - cli_system_snmp_community
        - cli_system_snmp_community_hosts
        - cli_system_snmp_community_hosts6
        - cli_system_snmp_user
        - cli_system_socfabric_trustedlist
        - cli_system_sql_customindex
        - cli_system_sql_customskipidx
        - cli_system_sql_tsindexfield
        - cli_system_syslog
        - cli_system_workflow_approvalmatrix
        - dvmdb_adom
        - dvmdb_device_vdom
        - dvmdb_folder
        - dvmdb_group
        description: Selector of the renamed object.
        required: true
        type: str
      self:
        description: The parameter for each selector.
        required: true
        type: dict
      target:
        description: Attribute to override for target object.
        required: true
        type: dict
    type: dict

log_path:
    default: /tmp/fortianalyzer.ansible.log
    description:
    - The path to save log. Used if enable_log is true.
    - Please use absolute path instead of relative path.
    - If the log_path setting is incorrect, the log will be saved in /tmp/fortianalyzer.ansible.log
    required: false
    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

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

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 fortianalyzer version.
  returned: complex
  type: list