fortinet / fortinet.fortimanager / 2.4.0 / module / fmgr_dvmdb_device Device table, most attributes are read-only and can only be changed internally. | "added in version" 1.0.0 of fortinet.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 communityfortinet.fortimanager.fmgr_dvmdb_device (2.4.0) — module
Install with ansible-galaxy collection install fortinet.fortimanager:==2.4.0
collections: - name: fortinet.fortimanager version: 2.4.0
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: fortimanagers gather_facts: false connection: httpapi vars: ansible_httpapi_use_ssl: true ansible_httpapi_validate_certs: false ansible_httpapi_port: 443 device_adom: "root" tasks: - name: Fetch all devices fortinet.fortimanager.fmgr_fact: facts: selector: "dvmdb_device" params: adom: "{{ device_adom }}" device: "your_value" register: alldevices - name: No name when: alldevices.meta.response_data != [] ansible.builtin.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 }}" - name: Create The Task To Delete The Device when: alldevices.meta.response_data != [] and False fortinet.fortimanager.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 - name: Poll the task when: alldevices.meta.response_data != [] and False fortinet.fortimanager.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 type: list enable_log: default: false description: Enable/Disable logging for task. type: bool access_token: description: The token to access FortiManager without using username and password. type: str dvmdb_device: description: The top level parameters set. required: false suboptions: adm_pass: description: (list) No description. type: raw 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: Deprecated, please rename it to faz_full_act. type: int faz.perm: description: Deprecated, please rename it to faz_perm. type: int faz.quota: description: Deprecated, please rename it to faz_quota. type: int faz.used: description: Deprecated, please rename it to faz_used. 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 - override_management_intf description: No 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: No 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: No 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_generation: description: No description. type: int 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: Deprecated, please rename it to meta_fields. 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 - fpa - fca - ftc 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: No description. elements: dict suboptions: comments: description: No description. type: str meta fields: description: Deprecated, please rename it to meta_fields. 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: (int or str) No description. type: raw type: dict rc_succeeded: description: The rc codes list with which the conditions to succeed will be overriden. elements: int type: list proposed_method: choices: - update - set - add description: The overridden method for the underlying Json RPC request. 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. 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. type: str forticloud_access_token: description: Authenticate Ansible client with forticloud API access token. type: str workspace_locking_timeout: default: 300 description: The maximum time in seconds to wait for other user to release the workspace lock. 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