What happens if you use shell instead of command?
I'm not 100% certain but I think what's happening is that since you're
using the ansible command module instead of the shell module, it is
running the equivalent of:
cat '/var/lib/pgsql/temp/truncate_sql'
'/var/lib/pgsql/temp/postcodesio-*' '|' 'psql' 'postcodesiodb'
That's sending the entire output of the first couple files to stdout
which the command module is then buffering to send back to the
controller.
If you use the shell module then the pipe will actually be interpreted
by the shell and so it will do what you want. (If I'm wrong about why
the MemoryError is happening, there might be another problem in
addition but I am hopeful that it's all tied together).
-Toshio
> --
> You received this message because you are subscribed to the Google Groups "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
ansible-deve...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-devel/6ff52565-cbdd-4dca-96ee-85382530d7b5%40googlegroups.com.