There’s no real examples that I know off, if you are not writing a module in Python (on Linux) or PowerShell (on Windows) it can still be done you just miss out on some of the helper functions that Ansible provides to parse the input requirements and output the end result back to the controller. Ultimately if you want to continue ahead with this you will need to;
Add a shebang to the start of the module, e.g. `#!/usr/bin/perl’
Add ‘# WANT_JSON’ in the module to get module args as JSON instead of key=value. Only the ‘WANT_JSON’ is important and ‘#’ is just to comment the line
Ansible executes the module and specifies the file where the module arguments are as the first argument, so you would need to read arg[1] in your script then read that file to get the input arguments
As stated above, by default these arguments are in a key=value form but adding ‘WANT_JSON’ ensures they are in json which is better for complex data- Do not print anything to the console except for the output json once the module is complete
The output json should at least return ‘{“changed”: false}’ (set to true if there was a change) but you can add whatever you want
If the module fails, add {“failed”: true} to the output json string alongside “msg” to indicate what went wrong
There’s probably more to add but ultimately it is possible to write modules in another language it just means you have to do the low level work yourself.