Hey everyone.
I am working on a role that will delete VM's from RHV and remove their
entries from satelite and AD.
The challenge I have is that I need to pass the current host into the name
field without doing a loop.  Right now my task called destroyvm.yml looks
like this:

- task to unregister from Satellite 6
- task to run a script to leave the AD domain.
- task to log into RHV
- name: Destroy VMs
  ovirt_vms:
     auth: "{{ ovirt_auth }}"
     name: "{{ item }}"
     cluster: "{{ cluster }}"
     state: absent
  with_items: "{{ group }}"
  delegate_to: "{{ rhv }}"
  async: 1
  poll: 0

I have about 6 groups of servers with multiple servers in each group.  What
is happening is for the first server in each group it runs through
everything fine and when it gets to the Destroy VMs task it destroys all
the VM's in the group before they are unregistered from Satellite and AD
(except for the first VM which is removed fine).  So my question is...is
there a way to just pass the current host/VM into the name slot without
doing the loop.

Thanks
Robert

-- 
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/CAJLEWMdH_GdnDtTwGqC-679nttr9beVhNBMJi4a6SZ3Nc%2BX5%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to