Extract ansible library file copying to a function

The logic here has grown enough that a series of copypasta is now fairly
beefy. Not that beef in pasta is bad or anything, but maybe let's do a
utility function.

Change-Id: Ibd91acac936f3dd52ccd57816de167e1487499ed
1 file changed