<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Ansible Get VMs per datastore in Automation Tools Discussions</title>
    <link>https://communities.vmware.com/t5/Automation-Tools-Discussions/Ansible-Get-VMs-per-datastore/m-p/2869330#M1545</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;Is it possible to return with an ansible module from the vmware.vmware_rest collection a list of VMs per datastore.&lt;BR /&gt;I'm trying to obtain the same result as the following powershell command: "Get-VM -Datastore datastore-name", but with Ansible.&lt;BR /&gt;How can I achieve that?&lt;/P&gt;&lt;P&gt;In the final, I want a dict with the vm name and the datastore:&lt;BR /&gt;vm1;datastoreA&lt;BR /&gt;vm2;datastoreA&lt;BR /&gt;vm3;datastoreB&lt;BR /&gt;vm4;datastoreC&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;Tanks for your help.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 14:37:21 GMT</pubDate>
    <dc:creator>va_dmiranda</dc:creator>
    <dc:date>2021-09-29T14:37:21Z</dc:date>
    <item>
      <title>Ansible Get VMs per datastore</title>
      <link>https://communities.vmware.com/t5/Automation-Tools-Discussions/Ansible-Get-VMs-per-datastore/m-p/2869330#M1545</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;Is it possible to return with an ansible module from the vmware.vmware_rest collection a list of VMs per datastore.&lt;BR /&gt;I'm trying to obtain the same result as the following powershell command: "Get-VM -Datastore datastore-name", but with Ansible.&lt;BR /&gt;How can I achieve that?&lt;/P&gt;&lt;P&gt;In the final, I want a dict with the vm name and the datastore:&lt;BR /&gt;vm1;datastoreA&lt;BR /&gt;vm2;datastoreA&lt;BR /&gt;vm3;datastoreB&lt;BR /&gt;vm4;datastoreC&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;Tanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 14:37:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Automation-Tools-Discussions/Ansible-Get-VMs-per-datastore/m-p/2869330#M1545</guid>
      <dc:creator>va_dmiranda</dc:creator>
      <dc:date>2021-09-29T14:37:21Z</dc:date>
    </item>
  </channel>
</rss>

