Copy Module Question

Hello Community,

I’m learning Ansible and I’m looking at the Copy module.

While the copy module is pretty straightforward the module doesn’t show how to specify the source machine and destination. For example, the following Copy scenario specifies src of /srv/myfiles/foo.conf and destination of /etc/foo.conf. But how would I specify the ip address, name etc of the source machine, and destination name, ip address etc of the destination machine?

- name: example copying file with owner and permissions
  copy:
    src: /srv/myfiles/foo.conf
    dest: /etc/foo.conf
    owner: foo
    group: foo
    mode: 0644

the source machine is the one
​executing ansible, the copy module has a remote_src=no|yes option that allows you to switch the src to come from the target machien, but there are no options to use a 3rd machine.

For copying from HostA to HostB via your machine you need to copy the file locally from HostA (fetch module) and then copy to HostB.