ansible/ansible — pull request #6374 by nemunaire (2014-03-10 16:38:04+00:00)
Title: Add the ability to run binary modules

Compiled modules from a non-interpretable language, such as C, C++, Go, ... are indicated in [the documentation](http://docs.ansible.com/developing_modules.html#tutorial) as acceptable; but in practice, they trigger two errors:

First, `failure encoding into utf-8` when trying to transfer UTF-8 encoded text whereas this is binary content.

Then, `module is missing interpreter line` while looking for a shebang into binary content.

For example, [here](https://gist.github.com/nemunaire/9465051) is minimal module written in C and [here](https://gist.github.com/shirou/5444078) a Go module inspired from [the tutorial](http://docs.ansible.com/developing_modules.html). They both successfully pass the `hacking/test-module`.

This patch adds binary detection by looking for the ELF magic number in module content.