Postgresql (Peer Authentication Error) with Ansible 2.4

Hi, i am having a problem in setting up postgresql through ansible.

Error::-

become and become_user is directives for the task not the module, so they need to be align on the same level as postgres_xxxx and name.

Thanks Kai, that problem got solved. but after that 1 more problem created. Below is the error log. Now i am able to create database.

Error::-

To me is looks like psycopg2 is missing some feature so you probably needs a new version of it.