Closed maxpearl closed 6 months ago
Also tried with postgresql 11, same error.
My guess is that you need to have the pip package psycopg2
installed to be able to create users, as documented here. I did this through a pre_task:
- hosts: db
become: yes
pre_tasks:
- name: Install psycopg2 for ansible to be able to create postgresql users
pip: name=psycopg2-binary
become: yes
roles:
- { role: ANXS.postgresql }
I installed psycopg2 using Debian's python-psycopg2 package in a pre-task. So perhaps the pip installation would be preferable. But in either event (a missing psycopg2 package, or one that doesn't match what's required) should throw a more specific error, no?
My guess is that you need to have the pip package
psycopg2
installed to be able to create users, as documented here. I did this through a pre_task:- hosts: db become: yes pre_tasks: - name: Install psycopg2 for ansible to be able to create postgresql users pip: name=psycopg2-binary become: yes roles: - { role: ANXS.postgresql }
This worked for me, I just added the install pip3 task:
pre_tasks:
- name: install pip3
become: yes
apt: name=python3-pip state=present update_cache=true
- name: Install psycopg2 for ansible to be able to create postgresql users
become: yes
pip: name=psycopg2-binary
EDIT: I'm using vagrant init ubuntu/bionic64
, which resolves to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-117-generic x86_64)
.
issue still persists after pre_tasks set to the above
make sure you have ACL package installed
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
I've got a very simple test setup, and I'm getting this error:
This is on a vagrant debian stretch virtualbox
The user and database in vars don't get created.
Here's the playbook:
And here are the vars: