Correct way to parse arguments in custom module

Hey folks,

I am currently trying to learn how to write custom modules for Ansible.
My goal is to just execute one command on a remote server, to get started.
But I cant seem to figure out how to correctly parse arguments in custom modules. The official documentation on developing modules first explains something about an arguments file which is generated on the fly, then says this is deprecated and one should look into the source code to find the answer. So I have found this

self.uid = module.params['uid']

and thus wrote this

args_data = module.params['app']

To use it later in the function.
However, I get this error

`
root@master:~# ansible ucs -m installAnApp.py -a app=mailserver
10.200.14.15 | FAILED! => {
“changed”: false,
“failed”: true,
“msg”: “unsupported parameter for module: app”
}

`

I would be very grateful if someone could explain how this is done!

Thanks in advance :slight_smile: