--- - hosts: vmware_fusion # gather_facts: no tasks: - name: Check that you can connect (GET) to a page and it returns a status 200 uri: url: https://172.16.135.1:8697/api/vms method: GET force_basic_auth: yes password: "ZmxlYWw6RmVyLm5hbmRvOTk=" body_format: json return_content: yes validate_certs: false headers: Content-Type: "application/vnd.vmware.vmw.rest-v1+json" Authorization: "Basic ZmxlYWw6RmVyLm5hbmRvOTk=" Accept: "application/vnd.vmware.vmw.rest-v1+json" register: vVMs - name: Debug debug: msg: "Mensaje Debug: {{ item.id }} {{ item.path }}" with_items: "{{ vVMs.json }}"