Skip to content

prefering python2 causes failure because of missing dependancies #189

Open
@archf

Description

This logic in /usr/local/bin/ansible-cmdb makes it that python2 is picked even when python3 is available and as dependencies got installed under python3 it will fail:

# Find python binary
PY_BIN=$(which python)
if [ -z "$PY_BIN" ]; then
    PY_BIN=$(which python3)
fi
if [ -z "$PY_BIN" ]; then
    echo "No python found. Aborting"
    exit 1
fi

e.g:

archf@wm ~/r/w/g/m/o/scripts master?> /usr/local/bin/ansible-cmdb -h
Traceback (most recent call last):
  File "/usr/local/bin/../lib/ansiblecmdb/ansible-cmdb.py", line 19, in <module>
    from mako import exceptions
ImportError: No module named mako

I think it should try python3 first. My operating system is Ubuntu 18.04. I suspect it might be working only on Fedora,RHEL,CentOS as of now.

Regards, Thanks for coding this software.

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions