The vmware_target_canonical_facts module

Using this module, you can find out the canonical name of an SCSI target; all you need to know is the ID of the target device:

- name: Get Canonical name of SCSI device  vmware_target_canonical_facts"    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no"    target_id: "6"   register: canonical_name

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.