I just installed Ansible the other day. I think you need to install postgresql separately.
There are several steps during the install that the playbook doesn’t account for very well.
One package, can’t remember which, maybe postgres, i had to install it, then the installer uninstalled my version and installed its own.