Hi @Grace Jr., John (Jay) , welcome to Microsoft Q&A forum.
It seems you want to manage Azure Postgres Server using Ansible Playbook.
We can refer to below article (this is specific to Azure MySQL but can be used in same way for Azure PostgreSQL except code change which is mentioned below this link) :
Tutorial: Configure databases in Azure Database for MySQL using Ansible
And then we can use below code from below link to create server/database:
More details on below link:
Manage PostgreSQL Server instance
Please let us know if this helps or we can discuss further on the same.