Creating a file locally

30 views
Skip to first unread message

Jacek

unread,
Nov 3, 2014, 7:42:16 PM11/3/14
to ansible...@googlegroups.com
  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

Brian Coca

unread,
Nov 3, 2014, 11:10:17 PM11/3/14
to ansible...@googlegroups.com
using delegate_to: localhost, local_action or connection: local with file/copy/template should do the trick

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1a47cb4d-d8b2-4fc4-a210-793ab061d95e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Jacek Cała

unread,
Nov 4, 2014, 4:31:44 PM11/4/14
to ansible...@googlegroups.com
Great, thanks!

  Jacek

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/c1wKUlyisL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages