faz_rename – Rename An Object.

New in version 2.11.

Synopsis

  • This module is able to configure a FortiAnalyzer device.
  • Examples include all parameters and values need to be adjusted to data sources before usage.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

Parameters

  • enable_log - Enable/Disable logging for task type: bool required: false default: False
  • rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
  • rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
  • rename - Rename An Object. type: dict
    • target - Attribute to override for target object. type: dict required: true
    • selector - selector of the renamed object type: str choices:
      • cli_fmupdate_fdssetting_pushoverridetoclient_announceip - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_fmupdate_fdssetting_serveroverride_servlist - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_fmupdate_serveraccesspriorities_privateserver - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_fmupdate_webspam_fgdsetting_serveroverride_servlist - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_group - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_group_member - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_ldap - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_radius - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_tacacs - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user_adom - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user_adomexclude - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0
      • cli_system_admin_user_dashboard - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user_dashboardtabs - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user_metadata - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user_policypackage - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_admin_user_restrictdevvdom - available versions: 6.2.1 6.2.2 6.2.3
      • cli_system_alertevent - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_certificate_ca - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_certificate_crl - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_certificate_local - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_certificate_remote - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_certificate_ssh - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_ha_peer - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_ha_privatepeer - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_ha_vip - available versions: 7.2.0
      • cli_system_interface - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_localinpolicy - available versions: 7.2.0
      • cli_system_localinpolicy6 - available versions: 7.2.0
      • cli_system_log_devicedisable - available versions: 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_log_maildomain - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_log_ratelimit_device - available versions: 7.0.0
      • cli_system_log_ratelimit_ratelimits - available versions: 7.2.0
      • cli_system_logfetch_clientprofile - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logfetch_clientprofile_devicefilter - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logfetch_clientprofile_logfilter - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logforward - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logforward_devicefilter - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logforward_logfieldexclusion - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logforward_logfilter - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_logforward_logmaskingcustom - available versions: 7.0.0 7.2.0
      • cli_system_mail - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_metadata_admins - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_ntp_ntpserver - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_report_group - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_route - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_route6 - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_saml_fabricidp - available versions: 6.2.1 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_saml_serviceproviders - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_sniffer - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_snmp_community - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_snmp_community_hosts - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_snmp_community_hosts6 - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_snmp_user - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_sql_customindex - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_sql_customskipidx - available versions: 6.2.1 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_sql_tsindexfield - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_syslog - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • cli_system_workflow_approvalmatrix - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0
      • dvmdb_adom - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • dvmdb_device_vdom - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • dvmdb_folder - available versions: 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
      • dvmdb_group - available versions: 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 7.0.0 7.2.0
    • self - the parameter for each selector type: dict choices:
      • params for cli_fmupdate_fdssetting_pushoverridetoclient_announceip:
        • announce-ip
      • params for cli_fmupdate_fdssetting_serveroverride_servlist:
        • servlist
      • params for cli_fmupdate_serveraccesspriorities_privateserver:
        • private-server
      • params for cli_fmupdate_webspam_fgdsetting_serveroverride_servlist:
        • servlist
      • params for cli_system_admin_group:
        • group
      • params for cli_system_admin_group_member:
        • group
        • member
      • params for cli_system_admin_ldap:
        • ldap
      • params for cli_system_admin_radius:
        • radius
      • params for cli_system_admin_tacacs:
        • tacacs
      • params for cli_system_admin_user:
        • user
      • params for cli_system_admin_user_adom:
        • user
        • adom
      • params for cli_system_admin_user_adomexclude:
        • user
        • adom-exclude
      • params for cli_system_admin_user_dashboard:
        • user
        • dashboard
      • params for cli_system_admin_user_dashboardtabs:
        • user
        • dashboard-tabs
      • params for cli_system_admin_user_metadata:
        • user
        • meta-data
      • params for cli_system_admin_user_policypackage:
        • user
        • policy-package
      • params for cli_system_admin_user_restrictdevvdom:
        • user
        • restrict-dev-vdom
      • params for cli_system_alertevent:
        • alert-event
      • params for cli_system_certificate_ca:
        • ca
      • params for cli_system_certificate_crl:
        • crl
      • params for cli_system_certificate_local:
        • local
      • params for cli_system_certificate_remote:
        • remote
      • params for cli_system_certificate_ssh:
        • ssh
      • params for cli_system_ha_peer:
        • peer
      • params for cli_system_ha_privatepeer:
        • private-peer
      • params for cli_system_ha_vip:
        • vip
      • params for cli_system_interface:
        • interface
      • params for cli_system_localinpolicy:
        • local-in-policy
      • params for cli_system_localinpolicy6:
        • local-in-policy6
      • params for cli_system_log_devicedisable:
        • device-disable
      • params for cli_system_log_maildomain:
        • mail-domain
      • params for cli_system_log_ratelimit_device:
        • device
      • params for cli_system_log_ratelimit_ratelimits:
        • ratelimits
      • params for cli_system_logfetch_clientprofile:
        • client-profile
      • params for cli_system_logfetch_clientprofile_devicefilter:
        • client-profile
        • device-filter
      • params for cli_system_logfetch_clientprofile_logfilter:
        • client-profile
        • log-filter
      • params for cli_system_logforward:
        • log-forward
      • params for cli_system_logforward_devicefilter:
        • log-forward
        • device-filter
      • params for cli_system_logforward_logfieldexclusion:
        • log-forward
        • log-field-exclusion
      • params for cli_system_logforward_logfilter:
        • log-forward
        • log-filter
      • params for cli_system_logforward_logmaskingcustom:
        • log-forward
        • log-masking-custom
      • params for cli_system_mail:
        • mail
      • params for cli_system_metadata_admins:
        • admins
      • params for cli_system_ntp_ntpserver:
        • ntpserver
      • params for cli_system_report_group:
        • group
      • params for cli_system_route:
        • route
      • params for cli_system_route6:
        • route6
      • params for cli_system_saml_fabricidp:
        • fabric-idp
      • params for cli_system_saml_serviceproviders:
        • service-providers
      • params for cli_system_sniffer:
        • sniffer
      • params for cli_system_snmp_community:
        • community
      • params for cli_system_snmp_community_hosts:
        • community
        • hosts
      • params for cli_system_snmp_community_hosts6:
        • community
        • hosts6
      • params for cli_system_snmp_user:
        • user
      • params for cli_system_sql_customindex:
        • custom-index
      • params for cli_system_sql_customskipidx:
        • custom-skipidx
      • params for cli_system_sql_tsindexfield:
        • ts-index-field
      • params for cli_system_syslog:
        • syslog
      • params for cli_system_workflow_approvalmatrix:
        • approval-matrix
      • params for dvmdb_adom:
        • adom
      • params for dvmdb_device_vdom:
        • adom
        • device
        • vdom
      • params for dvmdb_folder:
        • adom
        • folder
      • params for dvmdb_group:
        • adom
        • group

Notes

Note

  • Selector is a mandatory parameter for the module, and the params is varying depending on the selector.
  • Semantic description for the module: rename self as new target
  • Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded

Examples

- 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

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • request_url - The full url requested returned: always type: str sample: /sys/login/user
  • response_code - The status of api request returned: always type: int sample: 0
  • response_message - The descriptive message of the api response returned: always type: str sample: OK
  • response_data - The data body of the api response returned: optional type: list or dict

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Frank Shen (@fshen01)
  • Hongbin Lu (@fgtdev-hblu)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.