From 67d4340ba6224e8b20d5ec02fe24e908da8e9c9c Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 15 Oct 2018 18:46:34 +0200 Subject: [PATCH] hackmd: fix owner, persistent upload path, allow anon edits --- roles/hackmd/tasks/main.yml | 8 +++++++- roles/hackmd/templates/config.json.j2 | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/hackmd/tasks/main.yml b/roles/hackmd/tasks/main.yml index 9ec592d..8adc2f4 100644 --- a/roles/hackmd/tasks/main.yml +++ b/roles/hackmd/tasks/main.yml @@ -22,9 +22,15 @@ - python-psycopg2 - name: Unpack hackmd - unarchive: src=https://github.com/hackmdio/codimd/archive/{{ hackmd_version }}.tar.gz dest=/opt owner=hackmd remote_src=yes creates=/opt/codimd-{{ hackmd_version }} + unarchive: src=https://github.com/hackmdio/codimd/archive/{{ hackmd_version }}.tar.gz dest=/opt owner=hackmd group=hackmd remote_src=yes creates=/opt/codimd-{{ hackmd_version }} register: hackmd_unarchive +- name: Create hackmd upload path + file: path=/opt/codimd/uploads state=directory recurse=yes owner=hackmd group=hackmd + +- name: Link hackmd upload path + file: path=/opt/codimd/uploads dest=/opt/codimd-{{ hackmd_version }}/public/uploads state=link owner=hackmd group=hackmd + - name: Setup hackmd command: bin/setup chdir=/opt/codimd-{{ hackmd_version }} creates=/opt/codimd-{{ hackmd_version }}/config.json become: true diff --git a/roles/hackmd/templates/config.json.j2 b/roles/hackmd/templates/config.json.j2 index f183845..3a42db1 100644 --- a/roles/hackmd/templates/config.json.j2 +++ b/roles/hackmd/templates/config.json.j2 @@ -3,6 +3,7 @@ "domain": "{{ hackmd_domain }}", "protocolUseSSL": true, "allowAnonymous": false, + "allowAnonymousEdits": true, "allowFreeURL": true, "sessionSecret": "{{ hackmd_secret }}", "hsts": {