--- # Calls Prism Element (functionality unavailable in Prism Central) to mount # and enable Nutanix Guest Tools for created VM(s). - name: Pause to allow Nutanix to create VM(s) before mounting and enabling Nutanix Guest Tools pause: seconds: 30 - name: Mount Nutanix Guest Tools uri: url: "{{ pe_api_url }}/vms/{{ item }}/guest_tools/mount" body: length: 100 offset: 0 filter: "" method: POST validate_certs: no body_format: json status_code: 200 headers: Cookie: "{{ pe_session_cookie }}" register: json_mount_ngt_result ignore_errors: yes with_items: "{{ vm_uuids }}" - name: Debug | Mount NGT debug: msg: "Result of mounting NGT : {{ json_mount_ngt_result }}" when: global_debug|bool - name: Enable Nutanix Guest Tools uri: url: "{{ pe_api_url }}/vms/{{ item }}/guest_tools" body: "{{ lookup('template', 'vm-ngt.yml.j2') | from_yaml }}" method: POST validate_certs: no body_format: json status_code: [200,201,202] headers: Cookie: "{{ pe_session_cookie }}" register: json_enable_ngt_result ignore_errors: yes with_items: "{{ vm_uuids }}" - name: Debug | Enable NGT debug: msg: "Enabling NGT : {{ json_enable_ngt_result }}" when: global_debug|bool