Hi, i use the fetch module to copy files from remote to local:
    - delegate_to: localhost
      become: false
      command: whoami
      register: local_user

    - name: "copy to local"
      fetch:
        src: "/tmp/file.bz2"
        dest: "/home/{{ local_user.stdout }}"
        flat: true

I see this error:

The full traceback is:
NoneType: None
fatal: [server]: FAILED! => {
    "changed": false,
    "msg": "dest is an existing directory, use a trailing slash if you want
to fetch src into that directory"
}

I want to copy the file into my home folder (/home/user).

What am I doing wrong?

Regards,

-- 
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/CAGUDtn%3DvGmxjFqKZ8khvYZoJ0M%2BUR_i_-z99Zha8_nZoTDTZLA%40mail.gmail.com.

Reply via email to