Hello All,
I am trying to find out vmfs device name i.e. storage Lun number or WWPN (naa.60002ac0000000000000000000000000 )
I searched in vmware datastore facts module not able to get the exact result.
Please help me to get.
Thanks
Sadanand
Hello All,
I am trying to find out vmfs device name i.e. storage Lun number or WWPN (naa.60002ac0000000000000000000000000 )
I searched in vmware datastore facts module not able to get the exact result.
Please help me to get.
Thanks
Sadanand
Hi Sadanand,
Could you please share the playbook that you are using?
Thanks
Hello Abhijeet,
Thanks for giving reply.
As of now i am searching ansible module that will help me to get list of datastore WWPN number, so that not able to write playbook for the same.
I tried your existing VMware playbook examples but didnt find vmfs device number in that…
I appreciate your help.
Thanks
Sadanand
Hi Sadanand,
Can you try this, this will give you all extent of given VMFS volume and then you can extract diskName
name: Get all Datastore facts
vmware_datastore_info:
validate_certs: False
hostname: ‘{{ vcenter_hostname }}’
username: ‘{{ vcenter_username }}’
password: ‘{{ vcenter_password }}’
datacenter: “Asia-Datacenter1”
name: ds_171_1
schema: vsphere
register: all_datastores
debug:
msg: “{{ item.info.vmfs.extent }}”
with_items: “{{ all_datastores[‘datastores’] }}”
Hello Abhijit,
I tried using ‘vmware_datastore_facts’ module , gives below error .
[root@root are]# ansible-playbook pb_datacenter1.yml
PLAY [Gather cluster information for vCenter] **************************************************************************************************************************
included: /etc/ansible/vmware/login.yml for localhost
TASK [Login into vCenter] **********************************************************************************************************************************************
ok: [localhost]
TASK [Get all Datastore Facts] *****************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: "Unable to gather datastore facts in datacenter ********** "}
PLAY RECAP *************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0