Skip to content
Snippets Groups Projects
Verified Commit df387f02 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Make systemd configuration optional

parent 6074dda1
No related branches found
No related tags found
1 merge request!6CI tests
......@@ -138,6 +138,7 @@ Role Variables
| `funkwhale_ssl_cert_path` | `` | Path to an existing SSL certificate to use (use in combination with `funkwhale_letsencrypt_enabled: false`) |
| `funkwhale_ssl_key_path` | `` | Path to an existing SSL key to use (use in combination with `funkwhale_letsencrypt_enabled: false`) |
| `funkwhale_static_path` | `/srv/funkwhale/data/static` | Path were Funkwhale static files should be stored |
| `funkwhale_systemd_managed` | `true` | If `true`, will configure Funkwhale systemd services |
| `funkwhale_systemd_after` | `redis.service postgresql.service` | Configuration used for Systemd `After=` directive. Modify it if you have a database or redis server on a separate host |
| `funkwhale_systemd_service_name` | `funkwhale` | Name of the generated Systemd service, e.g when calling `systemctl start <xxx>` |
| `funkwhale_username` | `funkwhale` | Username of the system user and owner of Funkwhale data, files and configuration |
......
......@@ -21,6 +21,7 @@ funkwhale_web_workers: 1
funkwhale_protocol: https
funkwhale_settings_module: config.settings.production
funkwhale_env_vars: []
funkwhale_systemd_managed: true
funkwhale_systemd_after: redis.service postgresql.service
funkwhale_systemd_service_name: funkwhale
funkwhale_letsencrypt_certbot_flags:
......
......@@ -7,6 +7,7 @@
- name: reload funkwhale
become: true
when: funkwhale_systemd_managed
shell: |
systemctl kill -s HUP {{ funkwhale_systemd_service_name }}-server
systemctl kill -s HUP {{ funkwhale_systemd_service_name }}-worker
......
......@@ -2,6 +2,7 @@
- name: "Create {{ funkwhale_systemd_service_name }}-* systemd file"
become: true
when: funkwhale_systemd_managed
template:
src: "funkwhale-process.service.j2"
dest: "/etc/systemd/system/{{ funkwhale_systemd_service_name }}-{{ item.name }}.service"
......@@ -21,6 +22,7 @@
- name: "Create {{ funkwhale_systemd_service_name }} systemd target file"
become: true
when: funkwhale_systemd_managed
template:
src: "{{ funkwhale_systemd_service_name }}.target.j2"
dest: "/etc/systemd/system/{{ funkwhale_systemd_service_name }}.target"
......@@ -30,6 +32,7 @@
- name: "Start and enable {{ funkwhale_systemd_service_name }}-* services"
become: true
when: funkwhale_systemd_managed
systemd:
name: "{{ item }}"
enabled: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment