diff --git a/roles/matrix_element/defaults/main.yml b/roles/matrix_element/defaults/main.yml index e733118..ae0a188 100644 --- a/roles/matrix_element/defaults/main.yml +++ b/roles/matrix_element/defaults/main.yml @@ -5,9 +5,9 @@ element_id: element # Version to deploy, and expected sha1 -element_version: 1.7.19 +element_version: 1.7.20 # sha1sum of the tar.gz -element_archive_sha1: 2974b1901bd6e39ef8db9879f73b531c85b3149f +element_archive_sha1: aaf4b0423665af5818c450fc15625adcebbd2ee9 # Where to install element element_root_dir: /opt/matrix/element diff --git a/roles/n8n/defaults/main.yml b/roles/n8n/defaults/main.yml index 4f83544..845464c 100644 --- a/roles/n8n/defaults/main.yml +++ b/roles/n8n/defaults/main.yml @@ -34,7 +34,6 @@ n8n_config_base: generic: timezone: "{{ system_tz | default('Europe/Paris') }}" port: "{{ n8n_port }}" - encryptionKey: "{{ n8n_secret_key }}" # This lets you override just part of the defaults n8n_config_extra: {} n8n_config: "{{ n8n_config_base | combine(n8n_config_extra,recursive=True) }}" diff --git a/roles/n8n/tasks/conf.yml b/roles/n8n/tasks/conf.yml index a84f17e..5e897df 100644 --- a/roles/n8n/tasks/conf.yml +++ b/roles/n8n/tasks/conf.yml @@ -1,6 +1,9 @@ --- - name: Deploy n8n config - template: src=n8n.json.j2 dest={{ n8n_root_dir }}/etc/n8n.j2 group={{ n8n_user }} mode=640 + template: src={{ item }}.j2 dest={{ n8n_root_dir }}/etc/{{ item }} group={{ n8n_user }} mode=640 + loop: + - n8n.json + - env notify: restart n8n tags: n8n diff --git a/roles/n8n/tasks/install.yml b/roles/n8n/tasks/install.yml index 7eb3992..7dbdf1c 100644 --- a/roles/n8n/tasks/install.yml +++ b/roles/n8n/tasks/install.yml @@ -5,8 +5,10 @@ name: - nodejs - gcc + - gcc-c++ - make - sqlite-devel + - python3 tags: n8n - name: Install n8n diff --git a/roles/n8n/templates/env.j2 b/roles/n8n/templates/env.j2 new file mode 100644 index 0000000..d3bb219 --- /dev/null +++ b/roles/n8n/templates/env.j2 @@ -0,0 +1,5 @@ +N8N_CONFIG_FILES={{ n8n_root_dir }}/etc/n8n.json +N8N_USER_FOLDER={{ n8n_root_dir }}/data +WEBHOOK_TUNNEL_URL={{ n8n_public_url }} +VUE_APP_URL_BASE_API={{ n8n_public_url }} +N8N_ENCRYPTION_KEY={{ n8n_secret_key | quote }} diff --git a/roles/n8n/templates/n8n.service.j2 b/roles/n8n/templates/n8n.service.j2 index fee72cf..62b4d1d 100644 --- a/roles/n8n/templates/n8n.service.j2 +++ b/roles/n8n/templates/n8n.service.j2 @@ -6,10 +6,7 @@ After=syslog.target network.target mariadb.service Type=simple User={{ n8n_user }} Group={{ n8n_user }} -#EnvironmentFile={{ n8n_root_dir }}/etc/env -Environment=N8N_CONFIG_FILES={{ n8n_root_dir }}/etc/n8n.json -Environment=N8N_USER_FOLDER={{ n8n_root_dir }}/data -Environment=WEBHOOK_TUNNEL_URL={{ n8n_public_url }} +EnvironmentFile={{ n8n_root_dir }}/etc/env ExecStart={{ n8n_root_dir }}/app/node_modules/n8n/bin/n8n PrivateTmp=yes ProtectSystem=full