Hi

I'm new to using ansible, I'm writing a playbook to install a vm from template, 
everything works fine except for the disk names which stay the same as the 
template. The vm has more than one disk attached, I found this works for 
renaming the disk, but it only renames 1. how can I rename the others too?

- name: Print vm attributes
   ovirt.ovirt.ovirt_vm_info:
     auth: "{{ ovirt_auth }}"
     pattern: name="{{ vm_fqdn }}"
     fetch_nested: true
   register: vm_info
- debugging:
     msg: "{{ vm_info.ovirt_vms[0] }}"


  - name: Rename disk
    ovirt.ovirt.ovirt_disk:
      auth: "{{ ovirt_auth }}"
      id: "{{ vm_info.ovirt_vms[0].id }}"
      storage_domain: lrg0-ovirt-mydom-internal-Local
      name: "{{ vm_fqdn }}-osdisk0"
      vm_name: "{{ vm_fqdn }}"


Thanks
Regards
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/QB7EHQS7PKX4IQUWOBQXEGJR5HENBD7T/

Reply via email to