Move a file on the remote host

1,495 views
Skip to first unread message

Romain NIO

unread,
Feb 16, 2014, 1:23:42 PM2/16/14
to ansible...@googlegroups.com
Hi,

I looking for a very simple action : move a file with an ansible module on the remote host. (like the mv command).

Now, I'm using the 'fetch' module and then the 'copy' module but I sure that there is an ansible module that can the two actions in the same time.

Thanks!!
Romain

Michael DeHaan

unread,
Feb 17, 2014, 10:23:58 AM2/17/14
to ansible...@googlegroups.com
Here's one way to do it:

shell: mv path1 path2 remotes=path1 creates=path2






--
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.
For more options, visit https://groups.google.com/groups/opt_out.

vitaly bichov

unread,
Mar 16, 2016, 7:33:49 AM3/16/16
to Ansible Project
I'm looking for the same functionality.

For some reason the guys from ansible refuse to implement such module (all solutions suggest using a shell module).

Any idea why is that?
Reply all
Reply to author
Forward
0 new messages