ansible / ansible-rulebook

Apache License 2.0
193 stars 77 forks source link

ansible-rulebook requires psycopg python module #692

Closed chrismeyersfsu closed 3 months ago

chrismeyersfsu commented 3 months ago

Please confirm the following

Bug Summary

ansible-rulebook --version requires psycopg

Environment

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"

Steps to reproduce

Followed the installation steps here https://ansible.readthedocs.io/projects/rulebook/en/stable/installation.html Run ansible-rulebook --version

Actual results

ansible-rulebook --version
Traceback (most recent call last):
  File "/home/meyers/.local/bin/ansible-rulebook", line 5, in <module>
    from ansible_rulebook.cli import main
  File "/home/meyers/.local/lib/python3.10/site-packages/ansible_rulebook/cli.py", line 36, in <module>
    from ansible_rulebook import app  # noqa: E402
  File "/home/meyers/.local/lib/python3.10/site-packages/ansible_rulebook/app.py", line 32, in <module>
    from ansible_rulebook.engine import run_rulesets, start_source
  File "/home/meyers/.local/lib/python3.10/site-packages/ansible_rulebook/engine.py", line 37, in <module>
    from ansible_rulebook.rule_set_runner import RuleSetRunner
  File "/home/meyers/.local/lib/python3.10/site-packages/ansible_rulebook/rule_set_runner.py", line 36, in <module>
    from ansible_rulebook.action.pg_notify import PGNotify
  File "/home/meyers/.local/lib/python3.10/site-packages/ansible_rulebook/action/pg_notify.py", line 20, in <module>
    from psycopg import AsyncClientCursor, AsyncConnection, OperationalError
ModuleNotFoundError: No module named 'psycopg'

Expected results

For the version information to be printed.

Additional information

Seems like psycopg should be added to the Installation instructions.

Alex-Izquierdo commented 3 months ago

Fixed by https://github.com/ansible/ansible-rulebook/pull/690