hackmd: fix owner, persistent upload path, allow anon edits

This commit is contained in:
Markus 2018-10-15 18:46:34 +02:00
parent 22c1b0d469
commit 67d4340ba6
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -3,6 +3,7 @@
"domain": "{{ hackmd_domain }}",
"protocolUseSSL": true,
"allowAnonymous": false,
"allowAnonymousEdits": true,
"allowFreeURL": true,
"sessionSecret": "{{ hackmd_secret }}",
"hsts": {