# Creating a file locally

**URL:** <https://forum.ansible.com/t/creating-a-file-locally/16681>\
**Category:** Ansible Project\
**Created:** [November 4, 2014, 12:42am UTC](https://forum.ansible.com/t/creating-a-file-locally/16681 "2014-11-04T00:42:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacek](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@Jacek](https://forum.ansible.com/u/Jacek)\
**Post date:** [November 4, 2014, 12:42am UTC](https://forum.ansible.com/t/creating-a-file-locally/16681/1 "2014-11-04T00:42:16Z")

</div>

Hi,

Is there a way to ask ansible to create a file locally on the controller node where my playbook exists? I need to create a property file for further build process and it would be great if I could do it automatically via ansible based on the information from inventory.

To give a little more details. I use ansible to deploy my service on a remote cluster and once it’s deployed I need to upload various bits and pieces to it. The property file is used to identify the service endpoint address.

Cheers,  
Jacek

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [November 4, 2014, 4:10am UTC](https://forum.ansible.com/t/creating-a-file-locally/16681/2 "2014-11-04T04:10:12Z")

</div>

using delegate\_to: localhost, local\_action or connection: local with file/copy/template should do the trick

---

<div class="post-metadata">

**Author:** ![Jacek](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@Jacek](https://forum.ansible.com/u/Jacek)\
**Post date:** [November 4, 2014, 9:31pm UTC](https://forum.ansible.com/t/creating-a-file-locally/16681/3 "2014-11-04T21:31:40Z")

</div>

Great, thanks!

Jacek
