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