# creating a postgres user - non default postgres port

**URL:** <https://forum.ansible.com/t/creating-a-postgres-user-non-default-postgres-port/37142>\
**Category:** Ansible Project\
**Created:** [September 26, 2022, 10:09am UTC](https://forum.ansible.com/t/creating-a-postgres-user-non-default-postgres-port/37142 "2022-09-26T10:09:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dulhaver](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulhaver/32/1061_2.png) [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Post date:** [September 26, 2022, 10:09am UTC](https://forum.ansible.com/t/creating-a-postgres-user-non-default-postgres-port/37142/1 "2022-09-26T10:09:57Z")

</div>

I am trying to create a postgres user/role with community.postgresql.postgresql\_user.  
The instance I am trying to address runs on port 5436 so my TASK looks like

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [September 26, 2022, 10:50am UTC](https://forum.ansible.com/t/creating-a-postgres-user-non-default-postgres-port/37142/2 "2022-09-26T10:50:30Z")

</div>

This is correct, you supplied the port parameter at the task level itself, while you should provide it to the task.

Indent one level more.
