drmofu / drmofu.fortimanager / 2.2.2 / module / fmgr_dvmdb_device Device table, most attributes are read-only and can only be changed internally. | "added in version" 1.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 communitydrmofu.fortimanager.fmgr_dvmdb_device (2.2.2) — module
Install with ansible-galaxy collection install drmofu.fortimanager:==2.2.2
collections: - name: drmofu.fortimanager version: 2.2.2
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.
- 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: 'your_value' 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'
adom: description: the parameter (adom) in requested url required: true type: str device: description: the parameter (device) in requested url required: true 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 dvmdb_device: description: the top level parameters set required: false suboptions: adm_pass: description: description type: str adm_usr: description: no description type: str app_ver: description: no description type: str av_ver: description: no description type: str beta: description: no description type: int branch_pt: description: no description type: int build: description: no description type: int checksum: description: no description type: str conf_status: choices: - unknown - insync - outofsync description: no description type: str conn_mode: choices: - active - passive description: no description type: str conn_status: choices: - UNKNOWN - up - down description: no description type: str db_status: choices: - unknown - nomod - mod description: no description type: str desc: description: no description type: str dev_status: choices: - none - unknown - checkedin - inprogress - installed - aborted - sched - retry - canceled - pending - retrieved - changed_conf - sync_fail - timeout - rev_revert - auto_updated description: no description type: str eip: description: no description type: str fap_cnt: description: no description type: int faz.full_act: description: no description type: int faz.perm: description: no description type: int faz.quota: description: no description type: int faz.used: description: no description type: int fex_cnt: description: no description type: int first_tunnel_up: description: no description type: int flags: choices: - has_hdd - vdom_enabled - discover - reload - interim_build - offline_mode - is_model - fips_mode - linked_to_model - ip-conflict - faz-autosync - need_reset - backup_mode - azure_vwan_nva - fgsp_configured - cnf_mode - sase_managed description: description elements: str type: list foslic_cpu: description: VM Meter vCPU count. type: int foslic_dr_site: choices: - disable - enable description: VM Meter DR Site status. type: str foslic_inst_time: description: VM Meter first deployment time type: int foslic_last_sync: description: VM Meter last synchronized time type: int foslic_ram: description: VM Meter device RAM size type: int foslic_type: choices: - temporary - trial - regular - trial_expired description: VM Meter license type. type: str foslic_utm: choices: - fw - av - ips - app - url - utm - fwb description: description elements: str type: list fsw_cnt: description: no description type: int ha_group_id: description: no description type: int ha_group_name: description: no description type: str ha_mode: choices: - standalone - AP - AA - ELBC - DUAL - enabled - unknown - fmg-enabled - autoscale description: enabled - Value reserved for non-FOS HA devices. type: str ha_slave: description: description elements: dict suboptions: conf_status: description: no description type: int idx: description: no description type: int name: description: no description type: str prio: description: no description type: int role: choices: - slave - master description: no description type: str sn: description: no description type: str status: description: no description type: int type: list hdisk_size: description: no description type: int hostname: description: no description type: str hw_rev_major: description: no description type: int hw_rev_minor: description: no description type: int hyperscale: description: no description type: int ip: description: no description type: str ips_ext: description: no description type: int ips_ver: description: no description type: str last_checked: description: no description type: int last_resync: description: no description type: int latitude: description: no description type: str lic_flags: description: no description type: int lic_region: description: no description type: str location_from: description: no description type: str logdisk_size: description: no description type: int longitude: description: no description type: str maxvdom: description: no description type: int meta fields: description: no description type: dict mgmt_id: description: no description type: int mgmt_if: description: no description type: str mgmt_mode: choices: - unreg - fmg - faz - fmgfaz description: no description type: str mgmt_uuid: description: no description type: str mgt_vdom: description: no description type: str module_sn: description: no description type: str mr: description: no description type: int name: description: Unique name for the device. type: str nsxt_service_name: description: no description type: str os_type: choices: - unknown - fos - fsw - foc - fml - faz - fwb - fch - fct - log - fmg - fsa - fdd - fac - fpx - fna - fdc - ffw - fsr - fad - fap - fxt - fts - fai - fwc - fis - fed description: no description type: str os_ver: choices: - unknown - '0.0' - '1.0' - '2.0' - '3.0' - '4.0' - '5.0' - '6.0' - '7.0' - '8.0' - '9.0' description: no description type: str patch: description: no description type: int platform_str: description: no description type: str prefer_img_ver: description: no description type: str prio: description: no description type: int private_key: description: no description type: str private_key_status: description: no description type: int psk: description: no description type: str role: choices: - master - ha-slave - autoscale-slave description: no description type: str sn: description: Unique value for each device. type: str vdom: description: description elements: dict suboptions: comments: description: no description type: str meta fields: description: no description type: dict name: description: no description type: str opmode: choices: - nat - transparent description: no description type: str rtm_prof_id: description: no description type: int status: description: no description type: str vdom_type: choices: - traffic - admin description: no description type: str vpn_id: description: no description type: int type: list version: description: no description type: int vm_cpu: description: no description type: int vm_cpu_limit: description: no description type: int vm_lic_expire: description: no description type: int vm_lic_overdue_since: description: no description type: int vm_mem: description: no description type: int vm_mem_limit: description: no description type: int vm_status: description: no description type: int type: dict rc_succeeded: description: The rc codes list with which the conditions to succeed will be overriden. elements: int required: false type: list proposed_method: choices: - update - set - add description: The overridden method for the underlying Json RPC request. required: false type: str bypass_validation: default: false description: Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. required: false type: bool 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: Authenticate Ansible client with forticloud API access token. 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
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