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






On Thu, May 28, 2020, 3:31 PM Abhijeet Kasurde <[email protected]> wrote:

> 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'] }}"
>
>
> On Thu, May 28, 2020 at 11:27 AM Sadanand Alegaonkar <
> [email protected]> wrote:
>
>> 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
>>
>>
>> On Thu, 28 May 2020 at 11:19, Abhijeet Kasurde <[email protected]>
>> wrote:
>>
>>> Hi Sadanand,
>>>
>>> Could you please share the playbook that you are using?
>>>
>>> Thanks
>>>
>>> On Wed, May 27, 2020 at 4:42 PM Sadanand Alegaonkar <
>>> [email protected]> wrote:
>>>
>>>> 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
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ansible Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/e932b607-a7b3-408d-9a4c-132ed5aa412a%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ansible-project/e932b607-a7b3-408d-9a4c-132ed5aa412a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> Thanks,
>>> Abhijeet Kasurde
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAFwWkHoBDdLKNC2Ciy3LAArqfZexgt5f61WYNJ93W96aiMFrRQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAFwWkHoBDdLKNC2Ciy3LAArqfZexgt5f61WYNJ93W96aiMFrRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Thanks and Regards
>>  Sadanand V.Alegaonkar
>> Cell No:9975632660
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CA%2Bo9MBT5w1suxUF0WWqHraeiv68HiMx1q5q19sMJgbWJ%2B4qSMg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CA%2Bo9MBT5w1suxUF0WWqHraeiv68HiMx1q5q19sMJgbWJ%2B4qSMg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Thanks,
> Abhijeet Kasurde
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFwWkHpRb%2BrwesshxhC_PxtjNbpJz5mk%3Dd5LKGLMQTNMPbAGMg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAFwWkHpRb%2BrwesshxhC_PxtjNbpJz5mk%3Dd5LKGLMQTNMPbAGMg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2Bo9MBTaYfxcafNy08CsS%3D7%2BSVTGQQkEEmzccBoW5ozHUuaUOg%40mail.gmail.com.

Reply via email to