Skip to content
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

Add Environment options #9

Closed
djarbz opened this issue Dec 5, 2021 · 2 comments
Closed

Add Environment options #9

djarbz opened this issue Dec 5, 2021 · 2 comments

Comments

@djarbz
Copy link

djarbz commented Dec 5, 2021

I use a custom path for binaries and the code-server service will not source /etc/profile for the terminal.
See this issue

I propose that you add an option for an array of environment variable to be added to the service file definition.
Systemd Documentation

@pallxk
Copy link
Contributor

pallxk commented Dec 9, 2021

I've justed added the role variable code_server_env to configure additional environment variables. (9a88d13)

Try it out with ansible-galaxy install -f pallxk.code_server,master.

Note that code_server_env is a dict of variables, refer to example usage at https://github.com/testcab/ansible-role-code-server#example-playbook

I'm not using PATH in the example because I'm considering to use the user's login shell to launch code-server, so that PATH or any other environment variables configured in user's profile will be automatically sourced, avoiding duplicate configuration in code-server.

@djarbz
Copy link
Author

djarbz commented Feb 24, 2022

Sorry for the delay in getting back to you. This should work for me, thanks.

@djarbz djarbz closed this as completed Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants