Copying file with roles using file glob

26 views
Skip to first unread message

Gerhard Hannemann

unread,
Oct 7, 2014, 3:33:06 AM10/7/14
to ansible...@googlegroups.com
Hi

Stumbling across a problem with copying a set of file to a remote server.
I have a set of files within  a particular role, under the file directory, that a I need to copy across to a set of remote server.
I gave up on synchronization as it only produce a connection refused error. 
Trying copy in a loop using with file_glob.  I read the documentation regarding fileglobs in a role
Questions:
Is there any way for stripping the leading path?
Is my only option to copy these file using a local shell command, possibly using rysnc?
Are the any other suggestions on how this can be neatly done?

Thanks

Regards
Gerhard

Gerhard Hannemann

unread,
Oct 17, 2014, 3:10:00 AM10/17/14
to ansible...@googlegroups.com
Solved myself

I used the following filter to achieve what I need:

{{ item | basename }}

Regards
Gerhard
Reply all
Reply to author
Forward
0 new messages