# install postgresql

**URL:** <https://forum.ansible.com/t/install-postgresql/32118>\
**Category:** Ansible Project\
**Created:** [February 3, 2020, 8:51am UTC](https://forum.ansible.com/t/install-postgresql/32118 "2020-02-03T08:51:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaddam\_mahendra](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gaddam\_mahendra](https://forum.ansible.com/u/gaddam_mahendra)\
**Post date:** [February 3, 2020, 8:51am UTC](https://forum.ansible.com/t/install-postgresql/32118/1 "2020-02-03T08:51:19Z")

</div>

HI Team,  
could you please post a playbook to install postgresql database

thanks  
mahi

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [February 3, 2020, 9:12am UTC](https://forum.ansible.com/t/install-postgresql/32118/2 "2020-02-03T09:12:00Z")

</div>

Hi

This should do it:

---

<div class="post-metadata">

**Author:** ![gaddam\_mahendra](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gaddam\_mahendra](https://forum.ansible.com/u/gaddam_mahendra)\
**Post date:** [February 3, 2020, 2:41pm UTC](https://forum.ansible.com/t/install-postgresql/32118/3 "2020-02-03T14:41:29Z")

</div>

Thanks Dick,  
But i need to install with user xxxx and database xxxx how could i achive it when im running my below play book im getting below error could pls help out it below issue

> **(attachments)**
>
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/a/ad180c8950b617028cb7daa1c1c2079ccd94ad75.png)

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [February 3, 2020, 3:09pm UTC](https://forum.ansible.com/t/install-postgresql/32118/4 "2020-02-03T15:09:29Z")

</div>

> Thanks Dick,  
> But i need to install with user xxxx and database xxxx how could i achive it when im running my below play book im getting below error could pls help out it below issue

Your question was how to install postgresql, so that's the answer you got.  
If you need other things, ask for that.

Regarding the error you get with postgreql\_user, it LITERALLY says  
what's wrong and how to fix it.  
What part do you need helping out with?

Please make sure to copy/paste the text, and avoid attaching screen dumps.

Dick

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [February 3, 2020, 3:12pm UTC](https://forum.ansible.com/t/install-postgresql/32118/5 "2020-02-03T15:12:42Z")

</div>

> > Thanks Dick,  
> > But i need to install with user xxxx and database xxxx how could i achive it when im running my below play book im getting below error could pls help out it below issue
> 
> Your question was how to install postgresql, so that's the answer you got.  
> If you need other things, ask for that.
> 
> Regarding the error you get with postgreql\_user, it LITERALLY says  
> what's wrong and how to fix it.  
> What part do you need helping out with?
> 
> Please make sure to copy/paste the text, and avoid attaching screen dumps.

I agree with that, can't even read it in Thunderbird as the characters appear very small.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke
