# Quick question : Is there any oneline ad-hoc ansible for copy the file.txt from host1 (src) to host2 (dest) ?

**URL:** <https://forum.ansible.com/t/quick-question-is-there-any-oneline-ad-hoc-ansible-for-copy-the-file-txt-from-host1-src-to-host2-dest/30130>\
**Category:** Ansible Project\
**Created:** [April 17, 2019, 12:09am UTC](https://forum.ansible.com/t/quick-question-is-there-any-oneline-ad-hoc-ansible-for-copy-the-file-txt-from-host1-src-to-host2-dest/30130 "2019-04-17T00:09:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kylix\_Kumar](https://avatars.discourse-cdn.com/v4/letter/k/c37758/32.png) [@Kylix\_Kumar](https://forum.ansible.com/u/Kylix_Kumar)\
**Post date:** [April 17, 2019, 12:09am UTC](https://forum.ansible.com/t/quick-question-is-there-any-oneline-ad-hoc-ansible-for-copy-the-file-txt-from-host1-src-to-host2-dest/30130/1 "2019-04-17T00:09:26Z")

</div>

Quick question : Is there any oneline ad-hoc ansible for copy the file.txt from host1 (src) to host2 (dest) ?

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [April 24, 2019, 7:43pm UTC](https://forum.ansible.com/t/quick-question-is-there-any-oneline-ad-hoc-ansible-for-copy-the-file-txt-from-host1-src-to-host2-dest/30130/2 "2019-04-24T19:43:49Z")

</div>

If host1 is your Ansible contoller you can use copy if not you have synchronize or command module with scp.
