# Unable to use custom DB secrets for managed DB

**URL:** <https://forum.ansible.com/t/unable-to-use-custom-db-secrets-for-managed-db/36532>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [April 14, 2022, 8:12am UTC](https://forum.ansible.com/t/unable-to-use-custom-db-secrets-for-managed-db/36532 "2022-04-14T08:12:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Support\_Team](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/support_team/32/8171_2.png) [@Support\_Team](https://forum.ansible.com/u/Support_Team)\
**Post date:** [April 14, 2022, 8:12am UTC](https://forum.ansible.com/t/unable-to-use-custom-db-secrets-for-managed-db/36532/1 "2022-04-14T08:12:36Z")

</div>

Hello everybody.  
While deploying latest version of AWX I get stuck with awx-manager stdout log quoted below, please take a look ( tail ):

[installer : Store Database Configuration] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\r\ntask path: /opt/ansible/roles/installer/tasks/ **database\_configuration.yml:135** \nfatal: [localhost]: FAILED! =\> {"censored": "the output has been hidden due to the fact that ‘no\_log: true’ was specified for this result"}\n\r\nPLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\r\nlocalhost : ok=30 changed=0 unreachable=0 failed=1 skipped=18 rescued=0 ignored=0 \r\n\n",“job”:“2816774644978550448”,“name”:“awx”,“namespace”:“awx-namespace”,“error”:“exit status 2”}  
----- Ansible Task Status Event StdOut ([awx.ansible.com/v1beta1](http://awx.ansible.com/v1beta1), Kind=AWX, awx/awx-namespace) -----

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=30 changed=0 unreachable=0 **failed=1** skipped=18 rescued=0 ignored=0

---

<div class="post-metadata">

**Author:** ![Support\_Team](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/support_team/32/8171_2.png) [@Support\_Team](https://forum.ansible.com/u/Support_Team)\
**Post date:** [April 14, 2022, 2:56pm UTC](https://forum.ansible.com/t/unable-to-use-custom-db-secrets-for-managed-db/36532/2 "2022-04-14T14:56:29Z")

</div>

Hi folks!

I finally get it.  
“Store Database Configuration” play error occures when secret manifest does not include those host and port and database (in my case) key-value pairs.

Not obvious! If i need my db instance to be managed by Operator then the “host” and the “port” strings are excessive here.

Finally, that works fine:

```auto
cat > $DEPLOYMENT <<EOF
---
apiVersion: v1
kind: Secret
metadata:
name: $PGSECRETNAME
namespace: $NAMESPACE
stringData:
host: awx-postgres
port: "5432"
database: awx
username: awx
password: $PGPASSWORD
type: managed
type: Opaque

```

Conclusion:  
**Each of: host, port, database, username and password should be defined for type: managed secret.**

Thank you for your time!
