fortinet.fortimanager.fmgr_dvmdb_device – Device table, most attributes are read-only and can only be changed internally.

Note

This plugin is part of the fortinet.fortimanager collection (version 2.1.4).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install fortinet.fortimanager.

To use it in a playbook, specify: fortinet.fortimanager.fmgr_dvmdb_device.

New in version 2.10: of fortinet.fortimanager

Synopsis

  • 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.

Parameters

Parameter Choices/Defaults Comments
adom
string / required
the parameter (adom) in requested url
bypass_validation
boolean
    Choices:
  • no ←
  • yes
only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters
device
string / required
the parameter (device) in requested url
dvmdb_device
dictionary
the top level parameters set
adm_pass
string
no description
adm_usr
string
Adm_Usr.
app_ver
string
App_Ver.
av_ver
string
Av_Ver.
beta
integer
Beta.
branch_pt
integer
Branch_Pt.
build
integer
Build.
checksum
string
Checksum.
conf_status
string
    Choices:
  • unknown ←
  • insync
  • outofsync
Conf_Status.
conn_mode
string
    Choices:
  • active
  • passive ←
Conn_Mode.
conn_status
string
    Choices:
  • UNKNOWN ←
  • up
  • down
Conn_Status.
db_status
string
    Choices:
  • unknown ←
  • nomod
  • mod
Db_Status.
desc
string
Desc.
dev_status
string
    Choices:
  • none
  • unknown ←
  • checkedin
  • inprogress
  • installed
  • aborted
  • sched
  • retry
  • canceled
  • pending
  • retrieved
  • changed_conf
  • sync_fail
  • timeout
  • rev_revert
  • auto_updated
Dev_Status.
fap_cnt
integer
Fap_Cnt.
faz.full_act
integer
Faz.Full_Act.
faz.perm
integer
Faz.Perm.
faz.quota
integer
Faz.Quota.
faz.used
integer
Faz.Used.
fex_cnt
integer
Fex_Cnt.
flags
list / elements=string
    Choices:
  • has_hdd
  • vdom_enabled
  • discover
  • reload
  • interim_build
  • offline_mode
  • is_model
  • fips_mode
  • linked_to_model
  • ip-conflict
  • faz-autosync
no description
foslic_cpu
integer
VM Meter vCPU count.
foslic_dr_site
string
    Choices:
  • disable ←
  • enable
VM Meter DR Site status.
foslic_inst_time
integer
VM Meter first deployment time (in UNIX timestamp).
foslic_last_sync
integer
VM Meter last synchronized time (in UNIX timestamp).
foslic_ram
integer
VM Meter device RAM size (in MB).
foslic_type
string
    Choices:
  • temporary ←
  • trial
  • regular
  • trial_expired
VM Meter license type.
foslic_utm
list / elements=string
    Choices:
  • fw
  • av
  • ips
  • app
  • url
  • utm
  • fwb
no description
fsw_cnt
integer
Fsw_Cnt.
ha_group_id
integer
Ha_Group_Id.
ha_group_name
string
Ha_Group_Name.
ha_mode
string
    Choices:
  • standalone ←
  • AP
  • AA
  • ELBC
  • DUAL
  • enabled
  • unknown
  • fmg-enabled
  • autoscale
enabled - Value reserved for non-FOS HA devices.
hdisk_size
integer
Hdisk_Size.
hostname
string
Hostname.
hw_rev_major
integer
Hw_Rev_Major.
hw_rev_minor
integer
Hw_Rev_Minor.
hyperscale
integer
Hyperscale.
ip
string
Ip.
ips_ext
integer
Ips_Ext.
ips_ver
string
Ips_Ver.
last_checked
integer
Last_Checked.
last_resync
integer
Last_Resync.
latitude
string
Latitude.
lic_flags
integer
Lic_Flags.
lic_region
string
Lic_Region.
location_from
string
Location_From.
logdisk_size
integer
Logdisk_Size.
longitude
string
Longitude.
maxvdom
integer
Default:
10
Maxvdom.
meta fields
dictionary
no description
mgmt_id
integer
Mgmt_Id.
mgmt_if
string
Mgmt_If.
mgmt_mode
string
    Choices:
  • unreg ←
  • fmg
  • faz
  • fmgfaz
Mgmt_Mode.
mgt_vdom
string
Mgt_Vdom.
module_sn
string
Module_Sn.
mr
integer
Default:
-1
Mr.
name
string
Unique name for the device.
nsxt_service_name
string
Nsxt_Service_Name.
os_type
string
    Choices:
  • unknown ←
  • fos
  • fsw
  • foc
  • fml
  • faz
  • fwb
  • fch
  • fct
  • log
  • fmg
  • fsa
  • fdd
  • fac
  • fpx
  • fna
  • fdc
  • ffw
  • fsr
  • fad
  • fap
  • fxt
Os_Type.
os_ver
string
    Choices:
  • unknown ←
  • 0.0
  • 1.0
  • 2.0
  • 3.0
  • 4.0
  • 5.0
  • 6.0
  • 7.0
  • 8.0
Os_Ver.
patch
integer
Patch.
platform_str
string
Platform_Str.
prefer_img_ver
string
Prefer_Img_Ver.
prio
integer
Prio.
private_key
string
Private_Key.
private_key_status
integer
Private_Key_Status.
psk
string
Psk.
role
string
    Choices:
  • master ←
  • ha-slave
  • autoscale-slave
Role.
sn
string
Unique value for each device.
vdom
list / elements=string
no description
comments
string
Comments.
meta fields
dictionary
no description
name
string
Name.
opmode
string
    Choices:
  • nat ←
  • transparent
Opmode.
rtm_prof_id
integer
Rtm_Prof_Id.
status
string
Status.
vpn_id
integer
Vpn_Id.
version
integer
Version.
vm_cpu
integer
Vm_Cpu.
vm_cpu_limit
integer
Vm_Cpu_Limit.
vm_lic_expire
integer
Vm_Lic_Expire.
vm_mem
integer
Vm_Mem.
vm_mem_limit
integer
Vm_Mem_Limit.
vm_status
integer
Vm_Status.
enable_log
boolean
    Choices:
  • no ←
  • yes
Enable/Disable logging for task
proposed_method
string
    Choices:
  • update
  • set
  • add
The overridden method for the underlying Json RPC request
rc_failed
list / elements=string
the rc codes list with which the conditions to fail will be overriden
rc_succeeded
list / elements=string
the rc codes list with which the conditions to succeed will be overriden
state
string / required
    Choices:
  • present
  • absent
the directive to create, update or delete an object
workspace_locking_adom
string
the adom to lock for FortiManager running in workspace mode, the value can be global and others including root
workspace_locking_timeout
integer
Default:
300
the maximum time in seconds to wait for other user to release the workspace lock

Notes

Note

  • Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.

  • To create or update an object, use state present directive.

  • To delete an object, use state absent directive.

  • 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

- name: Delete first FOS devices from FMG In a specific adom
  hosts: fortimanager00
  gather_facts: no
  connection: httpapi
  collections:
    - fortinet.fortimanager
  vars:
    ansible_httpapi_use_ssl: True
    ansible_httpapi_validate_certs: False
    ansible_httpapi_port: 443
    device_adom: 'root'
  tasks:
    - name: fetch all devices
      fmgr_fact:
        facts:
            selector: 'dvmdb_device'
            params:
                adom: '{{ device_adom }}'
                device: ''
      register: alldevices
    - when: alldevices.meta.response_data != []
      debug:
        msg:
         - 'We are going to delete device: {{ alldevices.meta.response_data[0].name }}'
         - 'IP of the device is: {{ alldevices.meta.response_data[0].ip }}'
    - when: alldevices.meta.response_data != [] and False
      name: Create The Task To Delete The Device
      fmgr_dvm_cmd_del_device:
        dvm_cmd_del_device:
            device: '{{ alldevices.meta.response_data[0].name }}'
            adom: '{{ device_adom }}'
            flags:
             - 'create_task'
             - 'nonblocking'
      register: uninstalling_task
    - when: alldevices.meta.response_data != [] and False
      name: poll the task
      fmgr_fact:
        facts:
            selector: 'task_task'
            params:
                task: '{{uninstalling_task.meta.response_data.taskid}}'
      register: taskinfo
      until: taskinfo.meta.response_data.percent == 100
      retries: 30
      delay: 5
      failed_when: taskinfo.meta.response_data.state == 'error'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
request_url
string
always
The full url requested

Sample:
/sys/login/user
response_code
integer
always
The status of api request

response_message
string
always
The descriptive message of the api response

Sample:
OK.


Authors

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)