update_vm_defs.yml 944 B

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. # Update Cluster and VM(s) specifications with UUIDs for creation
  3. - name: Define Cluster UUID to use from name
  4. set_fact:
  5. cluster_uuid: "{{ item['uuid'] }}"
  6. when: "item['name'] == cluster_name"
  7. loop: "{{ cluster_uuids }}"
  8. - name: Update VM(s) specifications with subnet UUIDs
  9. include: update_subnet_uuids.yml
  10. loop: "{{ user_vm_defs }}"
  11. loop_control:
  12. loop_var: my_vm
  13. - name: Debug | Print updated VM(s) specifications with subnet UUIDs
  14. debug:
  15. msg: "Updated VM specifications with subnet UUIDs : {{ vm_defs_1 }}"
  16. when: global_debug|bool
  17. - name: Update VM specifications with image UUIDs
  18. include: update_image_uuids.yml
  19. loop: "{{ vm_defs_1 }}"
  20. loop_control:
  21. loop_var: my_vm
  22. - name: Store updated VM(s) specifications
  23. set_fact:
  24. ntx_vm_defs: "{{ vm_defs_2 }}"
  25. - name: Debug | Print final user VM(s) specifications for creation
  26. debug:
  27. msg: "VM(s) shall be created as per: {{ ntx_vm_defs }}"