'copy' operation on remote host?

37 views
Skip to first unread message

John Oliver

unread,
Nov 19, 2014, 6:03:51 PM11/19/14
to ansible...@googlegroups.com
Is there a way to use the 'copy' module, or an equivalent, to copy files from one spot to another on the target host?

Right now, I'm trying to use 'command' or 'shell', but I'm running into issues with unusable choking on an asterisk, and I have to use several lines to copy, set ownership, set perms, etc.

Brian Coca

unread,
Nov 19, 2014, 7:17:50 PM11/19/14
to ansible...@googlegroups.com
not currently, but it sounds like a useful feature.

You can start a discussion in ansible-devel mailing list or open a ticket in github (http://github.com/ansible/ansible-modules-core for the project to implement the feature.



--
Brian Coca

Marc Patermann

unread,
Nov 20, 2014, 3:23:27 AM11/20/14
to ansible...@googlegroups.com
Two shell tasks with "tar -c" and "tar -x"?

Marc

Josh Smift

unread,
Nov 20, 2014, 7:56:44 AM11/20/14
to ansible...@googlegroups.com
MP> Two shell tasks with "tar -c" and "tar -x"?

If you want to preserve permissions; or you could run a command that pipes
one to the other; or you could run a command that runs an rsync preserving
permissions.

If you want to copy a file and *change* the permissions, that could be
harder. Maybe the 'install' command?

-Josh (j...@care.com)



This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.
Reply all
Reply to author
Forward
0 new messages