-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
semaphore + ansible without venv #1075
Comments
I've deployed Semaphore with both a VENV and using a container. The trick is for your systemd unit file use a shell script to launch semaphore. In that shell script you can source your VENV activate script. Super simple. |
That's cool, but still doesn't explains why it can't work without venv. |
Post a copy of your systems unit file that is not working. VENV is not a requirement, it is just the most convenient method. Usually errors like this are due to systemd stripping environment variables or forgetting to set the correct user in the unit file. |
I just installed semaphore, and am getting the same error - {Edited to add more lines of error}
I do not use Here is my systemd service file. I tried adding the
|
I found a solution for my version of this issue. Ansible for me was installed as a user ( In order to get the proper path to use for PYTHONPATH, I ran So, I ended up adding this line to my service file: |
For my specific issue the Finally found a fix for my situation: My systemd user has a different home then the semaphore setting for So I had to add the Final result:
|
Hi there!
Looks like i having same issue like this one ModuleNotFoundError: No module named 'ansible' #714.
I tried installing .deb +
python3 -m pip install --user ansible
on clean debian 10,11,12, different python, pip and ansible versions and always had same result in semaphore:Yes, i can create
venv
, start semaphore with ampersand and it'll work, but i want use systemd-unit (which not so friendly withvenv
's) in case of server reboot/process stop/kill/fault ampersand won't restart semaphore.And so, my question is: is semaphore doesn't work with ansible installed without
venv
?The text was updated successfully, but these errors were encountered: