-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/usr/local/bin/gxadmin: line 332: psql: command not found #3
Comments
Hey @lecorguille
We use it as the galaxy and telegraf users.
In that case, I guess just set the path so psql is available?
I've been avoiding doing that, because of all the different names per OS and not wanting to deal with that, leaving it up to the choice of the admin a bit.
yeah! I tried doing that before but hadn't found a great solution to it? E.g. in this custom role here https://github.com/usegalaxy-eu/infrastructure-playbook/blob/4714cdcca7ddae3257bca61c198e69bc0fcd1689/roles/hxr.postgres-connection/tasks/main.yml but I'm not happy with it for other users, what if I overwrite their pgpass file? I don't know. |
…rently It is a time sink and very annoying to have to re-run playbooks until no more "command not found" errors appear because of forgetting to install role dependencies (meaning system packages, not other roles). See issue galaxyproject/ansible-gxadmin#3 for an example of someone complaining about this recurring problem. I thought of creating a role called "usegalaxy_eu.packages" that alleviates this problem. The idea is to define a list of the packages each role depends on in group_vars/all.yml (see the example below), then have the role check what other roles are imported in a play and install the corresponding dependencies. ```yaml # Ansible role package dependencies (managed by usegalaxy_eu.packages) packages: usegalaxy_eu.handy.os_setup: - findutils galaxyproject.gxadmin: - git - make - "postgresql{{ '-client' if ansible_os_family == 'Debian' }}" usegalaxy-eu.bashrc: - python3-psycopg2 - python3-pyyaml ``` The idea to create this role stems just from stumbling upon the problem. See galaxyproject/ansible-gxadmin#11 for an additional discussion on the topic.
On your side, how do you use gxadmin?
As the galaxy user or as root?
Because psql isn't install for root. So should we make this role install the postgresql-client?
Plus, it could be cool to set this file ~/.pgpass, since if the role is integrated with the main galaxy one, we have all the necessary variable to fill it.
The text was updated successfully, but these errors were encountered: