you might try
https://docs.ansible.com/ansible/2.6/modules/vmware_vm_facts_module.html
and see what you get back. I don't have an area to test it though.

On Wed, Aug 22, 2018 at 3:37 PM Carter, Stephen <scar...@ussignal.com>
wrote:

> All of our vCenters are unlinked, and completely independent making it a
> little more difficult.
>
>
>
> It’s possible we could have some more luck using a dynamic inventory from
> vCenter. We are looking at Tower, so it could be a possibility.
>
>
>
> *From: *<ansible-project@googlegroups.com> on behalf of Izzy <
> israelm5...@gmail.com>
> *Reply-To: *"ansible-project@googlegroups.com" <
> ansible-project@googlegroups.com>
> *Date: *Wednesday, August 22, 2018 at 2:36 PM
> *To: *"ansible-project@googlegroups.com" <ansible-project@googlegroups.com
> >
> *Subject: *Re: [ansible-project] Finding a VM on VCenters
>
>
>
> Not sure how you're Vcenters are setup, but in my environment our Vm's are
> not really assigned to specific Vcenter's so I use the UUID's to perform
> snapshots for each VM in one playbook.  I haven't figured out how to call
> the UUID so I have it set manually.
>
>
> Israel
>
>
>
>
>
>
>
> On Wed, Aug 22, 2018 at 11:03 AM Carter, Stephen <scar...@ussignal.com>
> wrote:
>
> Hello,
>
>
>
> I was curious if anyone has come up with a decent way of accomplishing
> this.
>
>
>
> I have an inventory file with a bunch of VM’s I manage currently.
>
>
>
> When we do maintenances we like to take a snapshot just before we perform
> actions however, I am hitting a hitch of trying to find a way to determine
> what vCenter the VM is located on. There can be several it could be on, and
> I really don’t want to statically go and define it for all my VM’s.
>
>
>
> Any ideas on the best way to accomplish this? I was thinking I could try
> vmware_guest_find and iterating through the vCenters but that seems
> inelegant and sort of slow.
>
>
>
> Thanks
>
>
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/6C256995-7C99-4FBD-A7B3-1D843397F49D%40contoso.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_ansible-2Dproject_6C256995-2D7C99-2D4FBD-2DA7B3-2D1D843397F49D-2540contoso.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=7Ty_eYDFFiXRND1RAQISSeNS1QfFRLmVvZ7qrV4n-wg&r=Iid-01ZpXFqqCzBota3YHnVir2adn7YklQPiXeDglN0&m=Hj3AIPar_HyrCIimOaKCp77IAYyKWNCheKdIqw9VxW0&s=lc6P1mrHPOQv5Jlss_Laj1vfT88fafaqUi9I-SMLjC4&e=>
> .
> For more options, visit https://groups.google.com/d/optout
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=7Ty_eYDFFiXRND1RAQISSeNS1QfFRLmVvZ7qrV4n-wg&r=Iid-01ZpXFqqCzBota3YHnVir2adn7YklQPiXeDglN0&m=Hj3AIPar_HyrCIimOaKCp77IAYyKWNCheKdIqw9VxW0&s=siL3wUnVz8qeyF0MOl5B8EIXa9e-L0aehxg8lUh45-I&e=>
> .
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CA%2B%3D2DCgvypeEXQGpROkpubuHTj6SZ0%3Dn%2BjorBF4wmgj7Zah%3DGg%40mail.gmail.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_ansible-2Dproject_CA-252B-253D2DCgvypeEXQGpROkpubuHTj6SZ0-253Dn-252BjorBF4wmgj7Zah-253DGg-2540mail.gmail.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=7Ty_eYDFFiXRND1RAQISSeNS1QfFRLmVvZ7qrV4n-wg&r=Iid-01ZpXFqqCzBota3YHnVir2adn7YklQPiXeDglN0&m=Hj3AIPar_HyrCIimOaKCp77IAYyKWNCheKdIqw9VxW0&s=4qiVHGWDjNLssXo1nm3CR4u6FsYU93UHmse3rR8_ML8&e=>
> .
> For more options, visit https://groups.google.com/d/optout
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=7Ty_eYDFFiXRND1RAQISSeNS1QfFRLmVvZ7qrV4n-wg&r=Iid-01ZpXFqqCzBota3YHnVir2adn7YklQPiXeDglN0&m=Hj3AIPar_HyrCIimOaKCp77IAYyKWNCheKdIqw9VxW0&s=siL3wUnVz8qeyF0MOl5B8EIXa9e-L0aehxg8lUh45-I&e=>
> .
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/C7059C6A-5E87-45CB-8853-F3F66479D1A5%40ussignal.com
> <https://groups.google.com/d/msgid/ansible-project/C7059C6A-5E87-45CB-8853-F3F66479D1A5%40ussignal.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services <https://www.redhat.com/>

jloza...@redhat.com

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BJWkSooPuPgGpa00e9Y_43_OdrXby2vvJHESYejrzbk9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to