Commit fd9e7132 authored by Antonis Kalou's avatar Antonis Kalou

Setup automatic environment exporting

Also add a default configuration for vagrant.
parent 4446f0b3
[Service]
{% for var_name in export %}
Environment="{{ var_name }}={{export[var_name]}}"
{% endfor %}
# NOTE: these are for local development only
export:
HOSTNAME: localhost
SECRET_KEY_BASE: secret
ERLANG_COOKIE: anothersecret
AP_BASE_URL: http://localhost:4000/activity_pub
FRONTEND_BASE_URL: http://localhost:3000
MAIL_DOMAIN: localhost
MAIL_KEY: 1234
DATABASE_USER: moodle
DATABASE_PASS: supertopsecret
DATABASE_NAME: moodle_net
DATABASE_HOST: localhost
......@@ -65,6 +65,15 @@
remote_src: no
become: yes
# FIXME: make sure file is templated with vault env vars
- name: export environment variables for service
template:
src: "../files/moodle_net.service.d/override.conf.j2"
dest: "/etc/systemd/system/moodle_net.service.d/override.conf"
mode: "0600"
remote_src: no
become: yes
- name: start moodle net service
systemd:
name: moodle_net
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment