Sorry for the delay, I meant to grab the example when I got back to my desk 
and lost track of it.
Here is an example I am using currently that works
  - name: restore disk from snapshot
    uri:
        url: https://{{ cluser_ip }}/api/internal/vmware/vm/snapshot/
{{snapshotlist.json.data[0].id}}/mount_disks
        headers:
          Content-Type: "application/json"
          Authorization: "Bearer {{ authtoken.json.token  }}" 
# pass authentication token from earlier rather than basic auth
        body: 
          targetVmId: '{{ target_vm_id }}' 
# VM to restore the disk snapshots to
          vmdkIds: ['
{{ snapshotdetails.json.snapshotDiskDetails[1].virtualDiskId }}'] 
# Rubrik wants an array of vmdk ID's to restore, without it will restore all in 
the snapshot 
        body_format: json
        method: POST 
        status_code: 202 # Rubrik returns 202 on sucess.
        return_content: yes 
        validate_certs: yes 
    tags: restore
    delegate_to: localhost
    become: no

On Wednesday, December 4, 2019 at 6:24:51 PM UTC-6, Robert Heppe wrote
>
> Thanks Nick,
>
> I have not.  I just tried this but get another error for the , at the end 
> of the line.  So I removed them and it errors again.
>
>          body:
>                "id": "{{ customer_id }}"
>                "name": "{{ customer_name }}"
>                "disabledFeatures": 
> ["visualize","dev_tools","advancedSettings","indexPatterns","savedObjectsManagement","timelion","graph","monitoring","ml","apm","maps","canvas","infrastructure","logs","siem","uptime"]
>
> Could you post your entire uri block as an example and I could try to 
> modify mine to match the syntax?
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0a725704-4d20-4cd3-baa9-dfbae22d40d8%40googlegroups.com.

Reply via email to