oracle.oci.oci_cloud_bridge_asset – Manage an Asset resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 5.3.0).

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 oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_cloud_bridge_asset.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to create, update and delete an Asset resource in Oracle Cloud Infrastructure

  • For state=present, creates an asset.

  • This resource has the following action operations in the oracle.oci.oci_cloud_bridge_asset_actions module: change_compartment, change_asset_tags.

Requirements

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

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
asset_id
string
Unique asset identifier.
Required for update using state=present when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.
Required for delete using state=absent when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: id
asset_source_ids
list / elements=string
List of asset source OCID.
This parameter is updatable.
asset_type
string
    Choices:
  • VMWARE_VM
  • VM
The type of asset.
Required for create using state=present, update using state=present with asset_id present.
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
  • security_token
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string
The OCID of the compartment that the asset belongs to.
Required for create using state=present.
Required for update when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
Required for delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
Required when asset_type is 'VMWARE_VM'
compute
dictionary
This parameter is updatable.
Applicable when asset_type is 'VMWARE_VM'
connected_networks
integer
Number of connected networks.
Applicable when asset_type is 'VMWARE_VM'
cores_count
integer
Number of CPUs.
Applicable when asset_type is 'VMWARE_VM'
cpu_model
string
CPU model name.
Applicable when asset_type is 'VMWARE_VM'
description
string
Information about the asset.
Applicable when asset_type is 'VMWARE_VM'
disks
list / elements=dictionary
Lists the set of disks belonging to the virtual machine. This list is unordered.
Applicable when asset_type is 'VMWARE_VM'
boot_order
integer
Order of boot volumes.
Applicable when asset_type is 'VMWARE_VM'
location
string
Location of the boot/data volume.
Applicable when asset_type is 'VMWARE_VM'
name
string
Disk name.
Applicable when asset_type is 'VMWARE_VM'
persistent_mode
string
The disk persistent mode.
Applicable when asset_type is 'VMWARE_VM'
size_in_mbs
integer
The size of the volume in MBs.
Applicable when asset_type is 'VMWARE_VM'
uuid
string
Disk UUID for the virtual disk, if available.
Applicable when asset_type is 'VMWARE_VM'
uuid_lun
string
Disk UUID LUN for the virtual disk, if available.
Applicable when asset_type is 'VMWARE_VM'
disks_count
integer
Number of disks.
Applicable when asset_type is 'VMWARE_VM'
dns_name
string
Fully Qualified DNS Name.
Applicable when asset_type is 'VMWARE_VM'
firmware
string
Information about firmware type for this virtual machine.
Applicable when asset_type is 'VMWARE_VM'
gpu_devices
list / elements=dictionary
List of GPU devices attached to a virtual machine.
Applicable when asset_type is 'VMWARE_VM'
cores_count
integer
Number of GPU cores.
Applicable when asset_type is 'VMWARE_VM'
description
string
GPU device description.
Applicable when asset_type is 'VMWARE_VM'
manufacturer
string
The manufacturer of GPU.
Applicable when asset_type is 'VMWARE_VM'
memory_in_mbs
integer
GPU memory size in MBs.
Applicable when asset_type is 'VMWARE_VM'
name
string
GPU device name.
Applicable when asset_type is 'VMWARE_VM'
gpu_devices_count
integer
Number of GPU devices.
Applicable when asset_type is 'VMWARE_VM'
guest_state
string
Guest state.
Applicable when asset_type is 'VMWARE_VM'
hardware_version
string
Hardware version.
Applicable when asset_type is 'VMWARE_VM'
host_name
string
Host name of the VM.
Applicable when asset_type is 'VMWARE_VM'
is_pmem_enabled
boolean
    Choices:
  • no
  • yes
Whether Pmem is enabled. Decides if NVDIMMs are used as a permanent memory.
Applicable when asset_type is 'VMWARE_VM'
is_tpm_enabled
boolean
    Choices:
  • no
  • yes
Whether Trusted Platform Module (TPM) is enabled.
Applicable when asset_type is 'VMWARE_VM'
latency_sensitivity
string
Latency sensitivity.
Applicable when asset_type is 'VMWARE_VM'
memory_in_mbs
integer
Memory size in MBs.
Applicable when asset_type is 'VMWARE_VM'
nics
list / elements=dictionary
List of network ethernet cards attached to a virtual machine.
Applicable when asset_type is 'VMWARE_VM'
ip_addresses
list / elements=string
List of IP addresses.
Applicable when asset_type is 'VMWARE_VM'
label
string
Provides a label and summary information for the device.
Applicable when asset_type is 'VMWARE_VM'
mac_address
string
Mac address of the VM.
Applicable when asset_type is 'VMWARE_VM'
mac_address_type
string
Mac address type.
Applicable when asset_type is 'VMWARE_VM'
network_name
string
Network name.
Applicable when asset_type is 'VMWARE_VM'
switch_name
string
Switch name.
Applicable when asset_type is 'VMWARE_VM'
nics_count
integer
Number of network ethernet cards.
Applicable when asset_type is 'VMWARE_VM'
nvdimm_controller
dictionary
Applicable when asset_type is 'VMWARE_VM'
bus_number
integer
Bus number.
Applicable when asset_type is 'VMWARE_VM'
label
string
Provides a label and summary information for the device.
Applicable when asset_type is 'VMWARE_VM'
nvdimms
list / elements=dictionary
The properties of the NVDIMMs attached to a virtual machine.
Applicable when asset_type is 'VMWARE_VM'
controller_key
integer
Controller key.
Applicable when asset_type is 'VMWARE_VM'
label
string
Provides a label and summary information for the device.
Applicable when asset_type is 'VMWARE_VM'
unit_number
integer
The unit number of NVDIMM.
Applicable when asset_type is 'VMWARE_VM'
operating_system
string
Operating system.
Applicable when asset_type is 'VMWARE_VM'
operating_system_version
string
Operating system version.
Applicable when asset_type is 'VMWARE_VM'
pmem_in_mbs
integer
Pmem size in MBs.
Applicable when asset_type is 'VMWARE_VM'
power_state
string
The current power state of the virtual machine.
Applicable when asset_type is 'VMWARE_VM'
primary_ip
string
Primary IP address of the compute instance.
Applicable when asset_type is 'VMWARE_VM'
scsi_controller
dictionary
Applicable when asset_type is 'VMWARE_VM'
label
string
Provides a label and summary information for the device.
Applicable when asset_type is 'VMWARE_VM'
shared_bus
string
Shared bus.
Applicable when asset_type is 'VMWARE_VM'
unit_number
integer
The unit number of the SCSI controller.
Applicable when asset_type is 'VMWARE_VM'
storage_provisioned_in_mbs
integer
Provision storage size in MBs.
Applicable when asset_type is 'VMWARE_VM'
threads_per_core_count
integer
Number of threads per core.
Applicable when asset_type is 'VMWARE_VM'
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
defined_tags
dictionary
The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: `{"Operations": {"CostCenter": "42"}}`
This parameter is updatable.
display_name
string
Asset display name.
Required for create, update, delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
This parameter is updatable when OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: name
external_asset_key
string
The key of the asset from the external environment.
Required for create using state=present.
Required when asset_type is 'VMWARE_VM'
force_create
boolean
    Choices:
  • no ←
  • yes
Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with key_by.
freeform_tags
dictionary
The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: `{"Department": "Finance"}`
This parameter is updatable.
inventory_id
string
Inventory ID to which an asset belongs.
Required for create using state=present.
Required when asset_type is 'VMWARE_VM'
key_by
list / elements=string
The list of attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource are used to uniquely identify a resource.
realm_specific_endpoint_template_enabled
boolean
    Choices:
  • no
  • yes
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
source_key
string
The source key to which the asset belongs.
Required for create using state=present.
Required when asset_type is 'VMWARE_VM'
state
string
    Choices:
  • present ←
  • absent
The state of the Asset.
Use state=present to create or update an Asset.
Use state=absent to delete an Asset.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
vm
dictionary
This parameter is updatable.
Applicable when asset_type is 'VMWARE_VM'
hypervisor_host
string
Host name/IP address of VM on which the host is running.
Applicable when asset_type is 'VMWARE_VM'
hypervisor_vendor
string
Hypervisor vendor.
Applicable when asset_type is 'VMWARE_VM'
hypervisor_version
string
Hypervisor version.
Applicable when asset_type is 'VMWARE_VM'
vmware_v_center
dictionary
This parameter is updatable.
Applicable when asset_type is 'VMWARE_VM'
data_center
string
Data center name.
Applicable when asset_type is 'VMWARE_VM'
vcenter_key
string
vCenter unique key.
Applicable when asset_type is 'VMWARE_VM'
vcenter_version
string
Dot-separated version string.
Applicable when asset_type is 'VMWARE_VM'
vmware_vm
dictionary
This parameter is updatable.
Applicable when asset_type is 'VMWARE_VM'
cluster
string
Cluster name.
Applicable when asset_type is 'VMWARE_VM'
customer_fields
list / elements=string
Customer fields.
Applicable when asset_type is 'VMWARE_VM'
customer_tags
list / elements=dictionary
Customer defined tags.
Applicable when asset_type is 'VMWARE_VM'
description
string
The tag description.
Applicable when asset_type is 'VMWARE_VM'
name
string
The tag name.
Applicable when asset_type is 'VMWARE_VM'
fault_tolerance_bandwidth
integer
Fault tolerance bandwidth.
Applicable when asset_type is 'VMWARE_VM'
fault_tolerance_secondary_latency
integer
Fault tolerance to secondary latency.
Applicable when asset_type is 'VMWARE_VM'
fault_tolerance_state
string
Fault tolerance state.
Applicable when asset_type is 'VMWARE_VM'
instance_uuid
string
vCenter-specific identifier of the virtual machine.
Applicable when asset_type is 'VMWARE_VM'
is_disks_cbt_enabled
boolean
    Choices:
  • no
  • yes
Indicates that change tracking is supported for virtual disks of this virtual machine. However, even if change tracking is supported, it might not be available for all disks of the virtual machine.
Applicable when asset_type is 'VMWARE_VM'
is_disks_uuid_enabled
boolean
    Choices:
  • no
  • yes
Whether changed block tracking for this VM's disk is active.
Applicable when asset_type is 'VMWARE_VM'
path
string
Path directory of the asset.
Applicable when asset_type is 'VMWARE_VM'
vmware_tools_status
string
VMware tools status.
Applicable when asset_type is 'VMWARE_VM'
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.

Examples

- name: Create asset with asset_type = VMWARE_VM
  oci_cloud_bridge_asset:
    # required
    inventory_id: "ocid1.inventory.oc1..xxxxxxEXAMPLExxxxxx"
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    source_key: source_key_example
    external_asset_key: external_asset_key_example
    asset_type: VMWARE_VM

    # optional
    display_name: display_name_example
    asset_source_ids: [ "asset_source_ids_example" ]
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    compute:
      # optional
      primary_ip: primary_ip_example
      dns_name: dns_name_example
      description: description_example
      cores_count: 56
      cpu_model: cpu_model_example
      gpu_devices_count: 56
      gpu_devices:
      - # optional
        name: name_example
        description: description_example
        cores_count: 56
        memory_in_mbs: 56
        manufacturer: manufacturer_example
      threads_per_core_count: 56
      memory_in_mbs: 56
      is_pmem_enabled: true
      pmem_in_mbs: 56
      operating_system: operating_system_example
      operating_system_version: operating_system_version_example
      host_name: host_name_example
      power_state: power_state_example
      guest_state: guest_state_example
      is_tpm_enabled: true
      connected_networks: 56
      nics_count: 56
      nics:
      - # optional
        label: label_example
        switch_name: switch_name_example
        mac_address: mac_address_example
        mac_address_type: mac_address_type_example
        network_name: network_name_example
        ip_addresses: [ "ip_addresses_example" ]
      storage_provisioned_in_mbs: 56
      disks_count: 56
      disks:
      - # optional
        name: name_example
        boot_order: 56
        uuid: uuid_example
        uuid_lun: uuid_lun_example
        size_in_mbs: 56
        location: location_example
        persistent_mode: persistent_mode_example
      firmware: firmware_example
      latency_sensitivity: latency_sensitivity_example
      nvdimms:
      - # optional
        label: label_example
        unit_number: 56
        controller_key: 56
      nvdimm_controller:
        # optional
        label: label_example
        bus_number: 56
      scsi_controller:
        # optional
        label: label_example
        unit_number: 56
        shared_bus: shared_bus_example
      hardware_version: hardware_version_example
    vm:
      # optional
      hypervisor_vendor: hypervisor_vendor_example
      hypervisor_version: hypervisor_version_example
      hypervisor_host: hypervisor_host_example
    vmware_vm:
      # optional
      cluster: cluster_example
      customer_fields: [ "customer_fields_example" ]
      customer_tags:
      - # optional
        name: name_example
        description: description_example
      instance_uuid: instance_uuid_example
      path: path_example
      vmware_tools_status: vmware_tools_status_example
      is_disks_uuid_enabled: true
      is_disks_cbt_enabled: true
      fault_tolerance_state: fault_tolerance_state_example
      fault_tolerance_bandwidth: 56
      fault_tolerance_secondary_latency: 56
    vmware_v_center:
      # optional
      vcenter_key: vcenter_key_example
      vcenter_version: vcenter_version_example
      data_center: data_center_example

- name: Create asset with asset_type = VM
  oci_cloud_bridge_asset:
    # required
    asset_type: VM

    # optional
    display_name: display_name_example
    asset_source_ids: [ "asset_source_ids_example" ]
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Update asset with asset_type = VMWARE_VM
  oci_cloud_bridge_asset:
    # required
    asset_type: VMWARE_VM

    # optional
    display_name: display_name_example
    asset_source_ids: [ "asset_source_ids_example" ]
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    compute:
      # optional
      primary_ip: primary_ip_example
      dns_name: dns_name_example
      description: description_example
      cores_count: 56
      cpu_model: cpu_model_example
      gpu_devices_count: 56
      gpu_devices:
      - # optional
        name: name_example
        description: description_example
        cores_count: 56
        memory_in_mbs: 56
        manufacturer: manufacturer_example
      threads_per_core_count: 56
      memory_in_mbs: 56
      is_pmem_enabled: true
      pmem_in_mbs: 56
      operating_system: operating_system_example
      operating_system_version: operating_system_version_example
      host_name: host_name_example
      power_state: power_state_example
      guest_state: guest_state_example
      is_tpm_enabled: true
      connected_networks: 56
      nics_count: 56
      nics:
      - # optional
        label: label_example
        switch_name: switch_name_example
        mac_address: mac_address_example
        mac_address_type: mac_address_type_example
        network_name: network_name_example
        ip_addresses: [ "ip_addresses_example" ]
      storage_provisioned_in_mbs: 56
      disks_count: 56
      disks:
      - # optional
        name: name_example
        boot_order: 56
        uuid: uuid_example
        uuid_lun: uuid_lun_example
        size_in_mbs: 56
        location: location_example
        persistent_mode: persistent_mode_example
      firmware: firmware_example
      latency_sensitivity: latency_sensitivity_example
      nvdimms:
      - # optional
        label: label_example
        unit_number: 56
        controller_key: 56
      nvdimm_controller:
        # optional
        label: label_example
        bus_number: 56
      scsi_controller:
        # optional
        label: label_example
        unit_number: 56
        shared_bus: shared_bus_example
      hardware_version: hardware_version_example
    vm:
      # optional
      hypervisor_vendor: hypervisor_vendor_example
      hypervisor_version: hypervisor_version_example
      hypervisor_host: hypervisor_host_example
    vmware_vm:
      # optional
      cluster: cluster_example
      customer_fields: [ "customer_fields_example" ]
      customer_tags:
      - # optional
        name: name_example
        description: description_example
      instance_uuid: instance_uuid_example
      path: path_example
      vmware_tools_status: vmware_tools_status_example
      is_disks_uuid_enabled: true
      is_disks_cbt_enabled: true
      fault_tolerance_state: fault_tolerance_state_example
      fault_tolerance_bandwidth: 56
      fault_tolerance_secondary_latency: 56
    vmware_v_center:
      # optional
      vcenter_key: vcenter_key_example
      vcenter_version: vcenter_version_example
      data_center: data_center_example

- name: Update asset with asset_type = VM
  oci_cloud_bridge_asset:
    # required
    asset_type: VM

    # optional
    display_name: display_name_example
    asset_source_ids: [ "asset_source_ids_example" ]
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Update asset using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set) with asset_type = VMWARE_VM
  oci_cloud_bridge_asset:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    asset_type: VMWARE_VM

    # optional
    display_name: display_name_example
    asset_source_ids: [ "asset_source_ids_example" ]
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    compute:
      # optional
      primary_ip: primary_ip_example
      dns_name: dns_name_example
      description: description_example
      cores_count: 56
      cpu_model: cpu_model_example
      gpu_devices_count: 56
      gpu_devices:
      - # optional
        name: name_example
        description: description_example
        cores_count: 56
        memory_in_mbs: 56
        manufacturer: manufacturer_example
      threads_per_core_count: 56
      memory_in_mbs: 56
      is_pmem_enabled: true
      pmem_in_mbs: 56
      operating_system: operating_system_example
      operating_system_version: operating_system_version_example
      host_name: host_name_example
      power_state: power_state_example
      guest_state: guest_state_example
      is_tpm_enabled: true
      connected_networks: 56
      nics_count: 56
      nics:
      - # optional
        label: label_example
        switch_name: switch_name_example
        mac_address: mac_address_example
        mac_address_type: mac_address_type_example
        network_name: network_name_example
        ip_addresses: [ "ip_addresses_example" ]
      storage_provisioned_in_mbs: 56
      disks_count: 56
      disks:
      - # optional
        name: name_example
        boot_order: 56
        uuid: uuid_example
        uuid_lun: uuid_lun_example
        size_in_mbs: 56
        location: location_example
        persistent_mode: persistent_mode_example
      firmware: firmware_example
      latency_sensitivity: latency_sensitivity_example
      nvdimms:
      - # optional
        label: label_example
        unit_number: 56
        controller_key: 56
      nvdimm_controller:
        # optional
        label: label_example
        bus_number: 56
      scsi_controller:
        # optional
        label: label_example
        unit_number: 56
        shared_bus: shared_bus_example
      hardware_version: hardware_version_example
    vm:
      # optional
      hypervisor_vendor: hypervisor_vendor_example
      hypervisor_version: hypervisor_version_example
      hypervisor_host: hypervisor_host_example
    vmware_vm:
      # optional
      cluster: cluster_example
      customer_fields: [ "customer_fields_example" ]
      customer_tags:
      - # optional
        name: name_example
        description: description_example
      instance_uuid: instance_uuid_example
      path: path_example
      vmware_tools_status: vmware_tools_status_example
      is_disks_uuid_enabled: true
      is_disks_cbt_enabled: true
      fault_tolerance_state: fault_tolerance_state_example
      fault_tolerance_bandwidth: 56
      fault_tolerance_secondary_latency: 56
    vmware_v_center:
      # optional
      vcenter_key: vcenter_key_example
      vcenter_version: vcenter_version_example
      data_center: data_center_example

- name: Update asset using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set) with asset_type = VM
  oci_cloud_bridge_asset:
    # required
    asset_type: VM

    # optional
    display_name: display_name_example
    asset_source_ids: [ "asset_source_ids_example" ]
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Delete asset
  oci_cloud_bridge_asset:
    # required
    asset_id: "ocid1.asset.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

- name: Delete asset using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_cloud_bridge_asset:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    state: absent

Return Values

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

Key Returned Description
asset
complex
on success
Details of the Asset resource acted upon by the current operation

Sample:
{'asset_source_ids': [], 'asset_type': 'VMWARE_VM', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'compute': {'connected_networks': 56, 'cores_count': 56, 'cpu_model': 'cpu_model_example', 'description': 'description_example', 'disks': [{'boot_order': 56, 'location': 'location_example', 'name': 'name_example', 'persistent_mode': 'persistent_mode_example', 'size_in_mbs': 56, 'uuid': 'uuid_example', 'uuid_lun': 'uuid_lun_example'}], 'disks_count': 56, 'dns_name': 'dns_name_example', 'firmware': 'firmware_example', 'gpu_devices': [{'cores_count': 56, 'description': 'description_example', 'manufacturer': 'manufacturer_example', 'memory_in_mbs': 56, 'name': 'name_example'}], 'gpu_devices_count': 56, 'guest_state': 'guest_state_example', 'hardware_version': 'hardware_version_example', 'host_name': 'host_name_example', 'is_pmem_enabled': True, 'is_tpm_enabled': True, 'latency_sensitivity': 'latency_sensitivity_example', 'memory_in_mbs': 56, 'nics': [{'ip_addresses': [], 'label': 'label_example', 'mac_address': 'mac_address_example', 'mac_address_type': 'mac_address_type_example', 'network_name': 'network_name_example', 'switch_name': 'switch_name_example'}], 'nics_count': 56, 'nvdimm_controller': {'bus_number': 56, 'label': 'label_example'}, 'nvdimms': [{'controller_key': 56, 'label': 'label_example', 'unit_number': 56}], 'operating_system': 'operating_system_example', 'operating_system_version': 'operating_system_version_example', 'pmem_in_mbs': 56, 'power_state': 'power_state_example', 'primary_ip': 'primary_ip_example', 'scsi_controller': {'label': 'label_example', 'shared_bus': 'shared_bus_example', 'unit_number': 56}, 'storage_provisioned_in_mbs': 56, 'threads_per_core_count': 56}, 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'external_asset_key': 'external_asset_key_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'inventory_id': 'ocid1.inventory.oc1..xxxxxxEXAMPLExxxxxx', 'lifecycle_state': 'ACTIVE', 'source_key': 'source_key_example', 'system_tags': {}, 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'vm': {'hypervisor_host': 'hypervisor_host_example', 'hypervisor_vendor': 'hypervisor_vendor_example', 'hypervisor_version': 'hypervisor_version_example'}, 'vmware_v_center': {'data_center': 'data_center_example', 'vcenter_key': 'vcenter_key_example', 'vcenter_version': 'vcenter_version_example'}, 'vmware_vm': {'cluster': 'cluster_example', 'customer_fields': [], 'customer_tags': [{'description': 'description_example', 'name': 'name_example'}], 'fault_tolerance_bandwidth': 56, 'fault_tolerance_secondary_latency': 56, 'fault_tolerance_state': 'fault_tolerance_state_example', 'instance_uuid': 'instance_uuid_example', 'is_disks_cbt_enabled': True, 'is_disks_uuid_enabled': True, 'path': 'path_example', 'vmware_tools_status': 'vmware_tools_status_example'}}
 
asset_source_ids
list / elements=string
on success
List of asset source OCID.

 
asset_type
string
on success
The type of asset.

Sample:
VMWARE_VM
 
compartment_id
string
on success
The OCID of the compartment to which an asset belongs to.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
compute
complex
on success

   
connected_networks
integer
on success
Number of connected networks.

Sample:
56
   
cores_count
integer
on success
Number of CPUs.

Sample:
56
   
cpu_model
string
on success
CPU model name.

Sample:
cpu_model_example
   
description
string
on success
Information about the asset.

Sample:
description_example
   
disks
complex
on success
Lists the set of disks belonging to the virtual machine. This list is unordered.

     
boot_order
integer
on success
Order of boot volumes.

Sample:
56
     
location
string
on success
Location of the boot/data volume.

Sample:
location_example
     
name
string
on success
Disk name.

Sample:
name_example
     
persistent_mode
string
on success
The disk persistent mode.

Sample:
persistent_mode_example
     
size_in_mbs
integer
on success
The size of the volume in MBs.

Sample:
56
     
uuid
string
on success
Disk UUID for the virtual disk, if available.

Sample:
uuid_example
     
uuid_lun
string
on success
Disk UUID LUN for the virtual disk, if available.

Sample:
uuid_lun_example
   
disks_count
integer
on success
Number of disks.

Sample:
56
   
dns_name
string
on success
Fully Qualified DNS Name.

Sample:
dns_name_example
   
firmware
string
on success
Information about firmware type for this virtual machine.

Sample:
firmware_example
   
gpu_devices
complex
on success
List of GPU devices attached to a virtual machine.

     
cores_count
integer
on success
Number of GPU cores.

Sample:
56
     
description
string
on success
GPU device description.

Sample:
description_example
     
manufacturer
string
on success
The manufacturer of GPU.

Sample:
manufacturer_example
     
memory_in_mbs
integer
on success
GPU memory size in MBs.

Sample:
56
     
name
string
on success
GPU device name.

Sample:
name_example
   
gpu_devices_count
integer
on success
Number of GPU devices.

Sample:
56
   
guest_state
string
on success
Guest state.

Sample:
guest_state_example
   
hardware_version
string
on success
Hardware version.

Sample:
hardware_version_example
   
host_name
string
on success
Host name of the VM.

Sample:
host_name_example
   
is_pmem_enabled
boolean
on success
Whether Pmem is enabled. Decides if NVDIMMs are used as a permanent memory.

Sample:
True
   
is_tpm_enabled
boolean
on success
Whether Trusted Platform Module (TPM) is enabled.

Sample:
True
   
latency_sensitivity
string
on success
Latency sensitivity.

Sample:
latency_sensitivity_example
   
memory_in_mbs
integer
on success
Memory size in MBs.

Sample:
56
   
nics
complex
on success
List of network ethernet cards attached to a virtual machine.

     
ip_addresses
list / elements=string
on success
List of IP addresses.

     
label
string
on success
Provides a label and summary information for the device.

Sample:
label_example
     
mac_address
string
on success
Mac address of the VM.

Sample:
mac_address_example
     
mac_address_type
string
on success
Mac address type.

Sample:
mac_address_type_example
     
network_name
string
on success
Network name.

Sample:
network_name_example
     
switch_name
string
on success
Switch name.

Sample:
switch_name_example
   
nics_count
integer
on success
Number of network ethernet cards.

Sample:
56
   
nvdimm_controller
complex
on success

     
bus_number
integer
on success
Bus number.

Sample:
56
     
label
string
on success
Provides a label and summary information for the device.

Sample:
label_example
   
nvdimms
complex
on success
The properties of the NVDIMMs attached to a virtual machine.

     
controller_key
integer
on success
Controller key.

Sample:
56
     
label
string
on success
Provides a label and summary information for the device.

Sample:
label_example
     
unit_number
integer
on success
The unit number of NVDIMM.

Sample:
56
   
operating_system
string
on success
Operating system.

Sample:
operating_system_example
   
operating_system_version
string
on success
Operating system version.

Sample:
operating_system_version_example
   
pmem_in_mbs
integer
on success
Pmem size in MBs.

Sample:
56
   
power_state
string
on success
The current power state of the virtual machine.

Sample:
power_state_example
   
primary_ip
string
on success
Primary IP address of the compute instance.

Sample:
primary_ip_example
   
scsi_controller
complex
on success

     
label
string
on success
Provides a label and summary information for the device.

Sample:
label_example
     
shared_bus
string
on success
Shared bus.

Sample:
shared_bus_example
     
unit_number
integer
on success
The unit number of the SCSI controller.

Sample:
56
   
storage_provisioned_in_mbs
integer
on success
Provision storage size in MBs.

Sample:
56
   
threads_per_core_count
integer
on success
Number of threads per core.

Sample:
56
 
defined_tags
dictionary
on success
The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: `{"Operations": {"CostCenter": "42"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
display_name
string
on success
Asset display name.

Sample:
display_name_example
 
external_asset_key
string
on success
The key of the asset from the external environment.

Sample:
external_asset_key_example
 
freeform_tags
dictionary
on success
The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: `{"Department": "Finance"}`

Sample:
{'Department': 'Finance'}
 
id
string
on success
Asset OCID that is immutable on creation.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
inventory_id
string
on success
Inventory ID to which an asset belongs to.

Sample:
ocid1.inventory.oc1..xxxxxxEXAMPLExxxxxx
 
lifecycle_state
string
on success
The current state of the asset.

Sample:
ACTIVE
 
source_key
string
on success
The source key that the asset belongs to.

Sample:
source_key_example
 
system_tags
dictionary
on success
The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: `{orcl-cloud: {free-tier-retain: true}}`

 
time_created
string
on success
The time when the asset was created. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The time when the asset was updated. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
vm
complex
on success

   
hypervisor_host
string
on success
Host name/IP address of VM on which the host is running.

Sample:
hypervisor_host_example
   
hypervisor_vendor
string
on success
Hypervisor vendor.

Sample:
hypervisor_vendor_example
   
hypervisor_version
string
on success
Hypervisor version.

Sample:
hypervisor_version_example
 
vmware_v_center
complex
on success

   
data_center
string
on success
Data center name.

Sample:
data_center_example
   
vcenter_key
string
on success
vCenter unique key.

Sample:
vcenter_key_example
   
vcenter_version
string
on success
Dot-separated version string.

Sample:
vcenter_version_example
 
vmware_vm
complex
on success

   
cluster
string
on success
Cluster name.

Sample:
cluster_example
   
customer_fields
list / elements=string
on success
Customer fields.

   
customer_tags
complex
on success
Customer defined tags.

     
description
string
on success
The tag description.

Sample:
description_example
     
name
string
on success
The tag name.

Sample:
name_example
   
fault_tolerance_bandwidth
integer
on success
Fault tolerance bandwidth.

Sample:
56
   
fault_tolerance_secondary_latency
integer
on success
Fault tolerance to secondary latency.

Sample:
56
   
fault_tolerance_state
string
on success
Fault tolerance state.

Sample:
fault_tolerance_state_example
   
instance_uuid
string
on success
vCenter-specific identifier of the virtual machine.

Sample:
instance_uuid_example
   
is_disks_cbt_enabled
boolean
on success
Indicates that change tracking is supported for virtual disks of this virtual machine. However, even if change tracking is supported, it might not be available for all disks of the virtual machine.

Sample:
True
   
is_disks_uuid_enabled
boolean
on success
Whether changed block tracking for this VM's disk is active.

Sample:
True
   
path
string
on success
Path directory of the asset.

Sample:
path_example
   
vmware_tools_status
string
on success
VMware tools status.

Sample:
vmware_tools_status_example


Authors

  • Oracle (@oracle)