using assemble with large files?

Was the assemble module designed to cap the size of the files it works with?

I was scripting something with Ansible today that had to grab a bunch of large files (logs) on remote servers and then concatenate them. I thought using the assemble module would be slicker than “shell cat >>” but on closer inspection the final file was truncated. Everything seemed to run fine. When I looked at the code I saw the assemble build the file in memory before writing it. Is limiting assemble to small files by design or is that something I should work up a patch to correct?

assemble is basically there to simulate conf.d file structures in applications that do not support conf.d, merely that.

I won’t say it’s by design though, so patches to make it awesome would be totally welcome.

http://github.com/ansible/ansible/pull/3003

I used this patch here to assemble a 9gb log file where before it died silently around 2gb.

Bonus: the code is smaller afterwards.

Outstanding!

BTW, looks like you may have a tab on line 79.

Hum. Not picking up on the tab in my code here. The tmp.write line there is indented the correct amount.

Might just be github formatting, I’ll check, thanks!