Hallo,
ich habe hier eine ansibe awx Installation und möchte die postgresql Datenbank prüfen.
Das Problem ist das psql nicht in den erwarteten Pfaden liegt und ein eingerichteter Symlink weitere Fehler wegen fehlender Dateien nach sich zieht.
Hat das jemand sauber gelöst und wenn ja wie?
Gruß
Ralf
root@srvansible plugins]# ./mk_postgres_2.py
which: no psql in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
^C
Session terminated, killing shell…Traceback (most recent call last):
File “./mk_postgres_2.py”, line 1073, in
main()
File “./mk_postgres_2.py”, line 1056, in main
my_collector = postgres_factory(config.dbuser)
File “./mk_postgres_2.py”, line 903, in postgres_factory
return PostgresLinux(db_user, pg_instance)
File “./mk_postgres_2.py”, line 592, in init
super(PostgresLinux, self).init(db_user, pg_instance)
File “./mk_postgres_2.py”, line 95, in init
self.databases = self.get_databases()
File “./mk_postgres_2.py”, line 138, in get_databases
out = self.run_sql_as_db_user(sql_cmd)
File “./mk_postgres_2.py”, line 634, in run_sql_as_db_user
out = ensure_str(proc.communicate()[0])
File “/usr/lib64/python2.7/subprocess.py”, line 792, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File “/usr/lib64/python2.7/subprocess.py”, line 478, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
[root@srvansible plugins]# ^C
[root@srvansible plugins]# …killed.
[root@srvansible /]# find / -name ps*|grep post
/opt/rh/rh-postgresql10/root/usr/bin/psql
/opt/rh/rh-postgresql10/root/usr/share/man/man1/psql.1.gz
/opt/rh/rh-postgresql10/root/usr/share/locale/it/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/es/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/ru/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/de/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/ps
/opt/rh/rh-postgresql10/root/usr/share/locale/zh_CN/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/ko/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/ja/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/cs/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/pt_BR/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/fr/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/pl/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/he/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/sv/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/locale/tr/LC_MESSAGES/psql-10.mo
/opt/rh/rh-postgresql10/root/usr/share/pgsql/psqlrc.sample