Writing Modules without AnsibleModule

Hi, does anyone have sample code on how to write a module not using the AnsibleModule object?

I’m trying to see how to access the params in a custom module in Python without AnsibleModule as preparation for writing modules in another language.

The only example I found is below which is reading in args from a file, which I don’t want, and I’m trying to pass params in as normal, i.e. test_module: a=5 b=5 and read them with sys.argv, argparse, etc. Is this possible?

`

read the argument string from the arguments file

args_file = sys.argv[1]
args_data = file(args_file).read()

for this module, we’re going to do key=value style arguments

this is up to each module to decide what it wants, but all

core modules besides ‘command’ and ‘shell’ take key=value

so this is highly recommended

arguments = shlex.split(args_data)
`
http://docs.ansible.com/ansible/developing_modules.html

Thanks,
Jason

Modules read their arguments from a file, this file is in JSON format
and how Ansible passes the options to it. That is what key=val get
transformed into.

Ahh, I mis-interpreted that example. Just tested with that chunk of code and all is good for key=value params.

THANKS!