How to copy a file from control machine to the host where task is running

34 views
Skip to first unread message

Deepa Yr

unread,
Mar 3, 2016, 4:34:12 AM3/3/16
to Ansible Project
I have few files in control machine ie host1.
My playbook/tasks are running on host2.
I need to copy the files from host1 to host2.

Please let me know how it can be done

Deepa Yr

unread,
Mar 7, 2016, 12:20:10 AM3/7/16
to Ansible Project
Any help on this ?

J Hawkesworth

unread,
Mar 7, 2016, 9:59:42 AM3/7/16
to Ansible Project

Dan Lang

unread,
Mar 7, 2016, 11:57:11 AM3/7/16
to Ansible Project
Besides the copy module, there is the synchronize module for syncing many files in a directory, http://docs.ansible.com/ansible/synchronize_module.html.  Feel free to review each of the modules that help with managing files, http://docs.ansible.com/ansible/list_of_files_modules.html
Reply all
Reply to author
Forward
0 new messages