Diff between template and copy if target directory doesn't exist

382 views
Skip to first unread message

Matt Hughes

unread,
Sep 5, 2014, 5:16:52 PM9/5/14
to ansible...@googlegroups.com
It appears the 'template' module doesn't auto create the destination directory, yet 'copy' module does.  I don't see any way to force it to auto-create, nor any module that would work around this.  Any one else experience this?  I would think both modules should have the same behavior.

Michael DeHaan

unread,
Sep 5, 2014, 5:19:47 PM9/5/14
to ansible...@googlegroups.com
I'm definitely open to either a feature request or a pull request to make this happen.




On Fri, Sep 5, 2014 at 5:16 PM, Matt Hughes <hughe...@gmail.com> wrote:
It appears the 'template' module doesn't auto create the destination directory, yet 'copy' module does.  I don't see any way to force it to auto-create, nor any module that would work around this.  Any one else experience this?  I would think both modules should have the same behavior.

--
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/fca591a5-adf0-4edd-a323-8a4090de2574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Hughes

unread,
Sep 5, 2014, 5:19:54 PM9/5/14
to ansible...@googlegroups.com
Ignore me :)

https://github.com/ansible/ansible/issues/3759

I found the 'file' module.

Michael DeHaan

unread,
Sep 5, 2014, 5:21:42 PM9/5/14
to ansible...@googlegroups.com
Yeah that's an old ticket, but the file module will serve as a workaround.

I'm open to the improvement idea.




--
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.
Reply all
Reply to author
Forward
0 new messages