On 15. feb. 2017 22:13, Alex Lien wrote:
Hi Kai,

Thank You so much for your help.  The loop works with your suggestions
except it seems to run a duplicate task and create a duplicate guest.  This
is with a test of 2 ESX hosts.  Is there a way to work around it?

This is what I have in my inventory:

[esxi]
esxi1
esxi4

# ansible-playbook --limit esxi cr_guests.yml

PLAY [all]
*********************************************************************

Since you inventory contain two hosts it will run the task two times, one time for each hosts. You only wanna run it once so in your playbook set "- hosts: localhost" and remove the line "connection: local"

--
Kai Stian Olstad

--
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/23048cd8-06f3-c44f-8861-cf8b6f04d97c%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to