---
- name: Prueba de conexión a Windows
  hosts: windows
  tasks:
    - name: Hacer ping a máquina
      ansible.windows.win_ping:

    - name: run the setup facts
      ansible.windows.setup:

    - name: Copy a single file
      ansible.windows.win_copy:
        src: prueba.txt
        dest: C:\Users\AnsibleNode\Desktop\escritorio.txt

    - name: Copy a single file where the source is on the remote host
      ansible.windows.win_copy:
        src: C:\Users\AnsibleNode\Desktop\escritorio.txt
        dest: C:\Users\AnsibleNode\Desktop\escritorioSegundo.txt
        remote_src: true