psycog2 is installed but postgresql_user gives error that psycog2 is required

14 views
Skip to first unread message

gearo...@gmail.com

unread,
Mar 7, 2018, 5:00:17 PM3/7/18
to Ansible Project
psycog2 has beeen installed using ansible pip module.

The postgresql_user module fails with a message saying psycog2 is required.

pip list shows that psycog2 is installed on the managed system.
ansible 2.4.3, python 2.7.10 
managed system is rhel 7.4

Have I missed something ?

gearo...@gmail.com

unread,
Mar 7, 2018, 5:44:14 PM3/7/18
to Ansible Project
I found that with /usr/bin/python I cannot import psycopg2, but with /usr/local/bin/python I can.  Guess there's two python envs on my managed host.

gearo...@gmail.com

unread,
Mar 7, 2018, 5:45:30 PM3/7/18
to Ansible Project
solved by setting
 ansible_python_interpreter: /usr/local/bin/python

On Wednesday, 7 March 2018 22:00:17 UTC, gearo...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages