# Assemble module idea

**URL:** <https://forum.ansible.com/t/assemble-module-idea/13087>\
**Category:** Ansible Project\
**Created:** [July 8, 2013, 11:58pm UTC](https://forum.ansible.com/t/assemble-module-idea/13087 "2013-07-08T23:58:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tin\_Tvrtkovic](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Tin\_Tvrtkovic](https://forum.ansible.com/u/Tin_Tvrtkovic)\
**Post date:** [July 8, 2013, 11:58pm UTC](https://forum.ansible.com/t/assemble-module-idea/13087/1 "2013-07-08T23:58:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 9, 2013, 12:35am UTC](https://forum.ansible.com/t/assemble-module-idea/13087/2 "2013-07-09T00:35:39Z")

</div>

Is the issue that the directory contains some files you do not wish to assemble?

---

<div class="post-metadata">

**Author:** ![Tin\_Tvrtkovic](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Tin\_Tvrtkovic](https://forum.ansible.com/u/Tin_Tvrtkovic)\
**Post date:** [July 9, 2013, 7:49am UTC](https://forum.ansible.com/t/assemble-module-idea/13087/3 "2013-07-09T07:49:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 10, 2013, 1:10am UTC](https://forum.ansible.com/t/assemble-module-idea/13087/4 "2013-07-10T01:10:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Zachary\_Buckholz](https://avatars.discourse-cdn.com/v4/letter/z/f1d935/32.png) [@Zachary\_Buckholz](https://forum.ansible.com/u/Zachary_Buckholz)\
**Post date:** [June 10, 2015, 8:58pm UTC](https://forum.ansible.com/t/assemble-module-idea/13087/5 "2015-06-10T20:58:06Z")

</div>

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
