Hello,
currently the assemble module takes a source directory as a parameter. How about adding an option of passing a list of file names to it in addition?
name: Assemble my .vimrc
assemble: dest=~/.vimrc files={{ file_list }}
where file_list would be an array var, or maybe tie it in with a with_items? Would this even be possible and/or desirable? Maybe the source directory param could even be reduced to a with_fileglob.
Is the issue that the directory contains some files you do not wish to assemble?
I’d like to offer users a library of snippets, in a special directory. They could then cherry pick from those snippets somehow and the snippets would get assembled into one file.
Initially I thought I would do the assembling on the controlling machine, then transfer the result. Now it occurs to me I can just take a list of snippets, ship them off to the server (using with_items) and assemble them there.
But even disregarding my current problem, is this idea something that looks interesting to you? I’d be willing to put some work into it if it’s feasible.
I’m open to having it work differently if it were passed a comma delimited list of files.
A small change will be need to be made to runner so with_items can feed it “items” and it will listify, if that makes sense, as “with_items” is a clearer way to pass it along.
This is how the yum and apt module install multiple packages in a single transaction.
Let me know if I need to explain further, search for yum in the runner/init.py code and you will see what I mean about how this works for those!
Was there ever any further traction on the assemble module taking a list of files using “with_items”? To documentation still states it uses a directory.
Thanks
Zach