# Aliases + module.params

**URL:** <https://forum.ansible.com/t/aliases-module-params/27060>\
**Category:** Ansible Project\
**Created:** [March 20, 2018, 9:34pm UTC](https://forum.ansible.com/t/aliases-module-params/27060 "2018-03-20T21:34:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Stephen1](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Alex\_Stephen1](https://forum.ansible.com/u/Alex_Stephen1)\
**Post date:** [March 20, 2018, 9:34pm UTC](https://forum.ansible.com/t/aliases-module-params/27060/1 "2018-03-20T21:34:43Z")

</div>

I’m in the process of writing an Ansible module.  
I’ve currently got an Ansible task that includes this piece of code:

```auto
...
allowed:
- ip_protocol: 'tcp'
- port: '22'
...

```

AnsibleModule looks something like this:

```auto
AnsibleModule(
argument_spec=dict(
allowed=dict(type='list', elements='dict', options=dict(
IPProtocol=dict(required=True, type='str', aliases=['ip_protocol']),
ports=dict(type='list', elements='str')
))
)
)

```

(tldr; ip\_protocol is an alias of IPProtocol).

I end up doing some work with module.params later on. I would expect module.params to look like this:

```auto
{
allowed: [
{
IPProtocol: 'tcp',
ports: '22'
}
]
}

```

Instead, it looks like this:

```auto
{
allowed: [
{
IPProtocol: 'tcp',
ip_protocol: 'tcp',
ports: '22'
}
]
}

```

Is there a way to get a version of module.params that doesn’t have each alias listed out in this way?
