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

Comments

adom

string / required

the parameter (adom) in requested url

bypass_validation

boolean

only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters

Choices:

  • no ← (default)

  • yes

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

Conf_Status.

Choices:

  • unknown ← (default)

  • insync

  • outofsync

conn_mode

string

Conn_Mode.

Choices:

  • active

  • passive ← (default)

conn_status

string

Conn_Status.

Choices:

  • UNKNOWN ← (default)

  • up

  • down

db_status

string

Db_Status.

Choices:

  • unknown ← (default)

  • nomod

  • mod

desc

string

Desc.

dev_status

string

Dev_Status.

Choices:

  • none

  • unknown ← (default)

  • checkedin

  • inprogress

  • installed

  • aborted

  • sched

  • retry

  • canceled

  • pending

  • retrieved

  • changed_conf

  • sync_fail

  • timeout

  • rev_revert

  • auto_updated

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

no description

Choices:

  • has_hdd

  • vdom_enabled

  • discover

  • reload

  • interim_build

  • offline_mode

  • is_model

  • fips_mode

  • linked_to_model

  • ip-conflict

  • faz-autosync

foslic_cpu

integer

VM Meter vCPU count.

foslic_dr_site

string

VM Meter DR Site status.

Choices:

  • disable ← (default)

  • enable

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

VM Meter license type.

Choices:

  • temporary ← (default)

  • trial

  • regular

  • trial_expired

foslic_utm

list / elements=string

no description

Choices:

  • fw

  • av

  • ips

  • app

  • url

  • utm

  • fwb

fsw_cnt

integer

Fsw_Cnt.

ha_group_id

integer

Ha_Group_Id.

ha_group_name

string

Ha_Group_Name.

ha_mode

string

enabled - Value reserved for non-FOS HA devices.

Choices:

  • standalone ← (default)

  • AP

  • AA

  • ELBC

  • DUAL

  • enabled

  • unknown

  • fmg-enabled

  • autoscale

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

Maxvdom.

Default: 10

meta fields

dictionary

no description

mgmt_id

integer

Mgmt_Id.

mgmt_if

string

Mgmt_If.

mgmt_mode

string

Mgmt_Mode.

Choices:

  • unreg ← (default)

  • fmg

  • faz

  • fmgfaz

mgt_vdom

string

Mgt_Vdom.

module_sn

string

Module_Sn.

mr

integer

Mr.

Default: -1

name

string

Unique name for the device.

nsxt_service_name

string

Nsxt_Service_Name.

os_type

string

Os_Type.

Choices:

  • unknown ← (default)

  • fos

  • fsw

  • foc

  • fml

  • faz

  • fwb

  • fch

  • fct

  • log

  • fmg

  • fsa

  • fdd

  • fac

  • fpx

  • fna

  • fdc

  • ffw

  • fsr

  • fad

  • fap

  • fxt

os_ver

string

Os_Ver.

Choices:

  • unknown ← (default)

  • 0.0

  • 1.0

  • 2.0

  • 3.0

  • 4.0

  • 5.0

  • 6.0

  • 7.0

  • 8.0

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

Role.

Choices:

  • master ← (default)

  • ha-slave

  • autoscale-slave

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

Opmode.

Choices:

  • nat ← (default)

  • transparent

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

Enable/Disable logging for task

Choices:

  • no ← (default)

  • yes

proposed_method

string

The overridden method for the underlying Json RPC request

Choices:

  • update

  • set

  • add

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

the directive to create, update or delete an object

Choices:

  • present

  • absent

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

the maximum time in seconds to wait for other user to release the workspace lock

Default: 300

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

Description

request_url

string

The full url requested

Returned: always

Sample: “/sys/login/user”

response_code

integer

The status of api request

Returned: always

Sample: 0

response_message

string

The descriptive message of the api response

Returned: always

Sample: “OK.”

Authors

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)