On Friday, 17 November 2017 23.15.51 CET Moreno Garcia wrote:
> Kai, thanks a lot for taking the time to reply.
>
> Tried with delegate_to
>
> "msg": "Unsupported parameters for (virt) module: delegate_to Supported
> parameters include: autostart,command,name,state,uri,xml"
Your indentation was wrong, it should be on the same level as virt, not under
virt.
> I already tried with localhost on the playbook, let me try again.
>
> Changing the name to localhost:
>
> - hosts: dbservers
> tasks:
>
> - name: Test command for VMs
> virt:
> command: status
> name: localhost
With delegate_to:
- hosts: dbservers
tasks:
- name: Test command for VMs
virt:
command: status
name: {{ inventory_hostname }}
delegate_to: localhost
With connection: local
- hosts: dbservers
connection: local
tasks:
- name: Test command for VMs
virt:
command: status
name: {{ inventory_hostname }}
--
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/4111041.Uy65SfQ6UT%40x1.
For more options, visit https://groups.google.com/d/optout.