Resnik066

updated

6 years ago

R

Resnik066

9 Posts

0

935

February 10th, 2021 16:00

Get volume information from dellemc_unity_host Module

Hello,
I am trying to get the volumes mapped to a host but the module only shows the volume hash.
is it possible to get the volume name and id from dellemc_unity_host.py or dellemc_unity_gatherfacts.py?

    - name: Get Host details using host_name
      dellemc_unity_host:
        unispherehost: "{ {array_name}}"
        username: "{ {username}}"
        password: "{ {password}}"
        verifycert: "{ {verifycert}}"
        host_name: "{ {host_name}}"
        state: "present"
      register: result1

OUTPUT:

    "result1": {
        "changed": false,
        "failed": false,
        "host_details": {
            "auto_manage_type": "HostManageEnum.UNKNOWN",
            "datastores": null,
            "description": "Ansible testing Host",
            "existed": true,
            "fc_host_initiators": [
                "20:00:00:10:00:00:00:01:10:00:00:10:00:00:00:01",
                "20:00:00:10:00:00:00:05:10:00:00:10:00:00:00:05"
            ],
            "hash": 8769389780145,
            "health": {
                "UnityHealth": {
                    "hash": 8769390374225
                }
            },
            "host_container": null,
            "host_ip_ports": null,
            "host_luns": {
                "UnityHostLunList": [
                    {
                        "UnityHostLun": {
                            "hash": 8769389780161
                        }
                    },
                    {
                        "UnityHostLun": {
                            "hash": 8769389780209
                        }
                    },
                    {
                        "UnityHostLun": {
                            "hash": 8769389780189
                        }
                    },
                    {
                        "UnityHostLun": {
                            "hash": 8769389780221
                        }
                    },
                    {
                        "UnityHostLun": {
                            "hash": 8769389780153
                        }
                    }
                ]
            },
            "host_polled_uuid": null,
            "host_pushed_uuid": null,
            "host_uuid": null,
            "host_v_vol_datastore": null,
            "id": "Host_96",
            "iscsi_host_initiators": null,
            "last_poll_time": null,
            "name": "Server_Test",
            "os_type": "Windows Server",
            "registration_type": null,
            "storage_resources": null,
            "tenant": null,
            "type": "HostTypeEnum.HOST_MANUAL",
            "vms": null
        }
    }