Skip to content

How to Copy Files between Two Nodes using Ansible

If you need to copy files between two (2) nodes, using Ansible, then you can do the following:

This solution uses the synchronize module, specifically using the delegate_to:source-server keywords.

- hosts: serverB tasks: - name: Copy Remote-To-Remote (from serverA to serverB) synchronize: src=/copy/from_serverA dest=/copy/to_serverB delegate_to: serverA
Code language: YAML (yaml)

See also  [Solved] Network interface is in use by another service in AWS
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x