# Fetch remote files, add them to local file

**URL:** <https://forum.ansible.com/t/fetch-remote-files-add-them-to-local-file/25904>\
**Category:** Ansible Project\
**Created:** [November 2, 2017, 5:44pm UTC](https://forum.ansible.com/t/fetch-remote-files-add-them-to-local-file/25904 "2017-11-02T17:44:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 2, 2017, 5:44pm UTC](https://forum.ansible.com/t/fetch-remote-files-add-them-to-local-file/25904/1 "2017-11-02T17:44:10Z")

</div>

I have the following playbook but have 2 problems:

1. The contents of the file are garbled. Why is that? How can I clear it up?
2. How can I just grab the contents of the file only? {{file\_contents.results.content}} complains

`

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 2, 2017, 7:55pm UTC](https://forum.ansible.com/t/fetch-remote-files-add-them-to-local-file/25904/2 "2017-11-02T19:55:10Z")

</div>

I ended up going this route:

`
