# Correct way to parse arguments in custom module

**URL:** <https://forum.ansible.com/t/correct-way-to-parse-arguments-in-custom-module/21471>\
**Category:** Ansible Developer\
**Created:** [May 18, 2016, 11:27am UTC](https://forum.ansible.com/t/correct-way-to-parse-arguments-in-custom-module/21471 "2016-05-18T11:27:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valentin\_He](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@Valentin\_He](https://forum.ansible.com/u/Valentin_He)\
**Post date:** [May 18, 2016, 11:27am UTC](https://forum.ansible.com/t/correct-way-to-parse-arguments-in-custom-module/21471/1 "2016-05-18T11:27:06Z")

</div>

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 🙂
