forked from infra/ansible
hackmd: new upstream URL and version 1.5.0
This commit is contained in:
parent
fbe1ac33c3
commit
a3675c0cc8
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
hackmd_version: 1.3.1
|
hackmd_version: 1.5.0
|
||||||
|
hackmd_archive: https://github.com/codimd/server/archive/{{ hackmd_version }}.tar.gz
|
||||||
|
@ -12,6 +12,21 @@
|
|||||||
- name: Enable nodesource repository
|
- name: Enable nodesource repository
|
||||||
apt_repository: repo="deb https://deb.nodesource.com/node_8.x/ {{ ansible_distribution_release }} main"
|
apt_repository: repo="deb https://deb.nodesource.com/node_8.x/ {{ ansible_distribution_release }} main"
|
||||||
|
|
||||||
|
- name: Enable yarnpkg apt-key
|
||||||
|
apt_key: url="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
|
||||||
|
- name: Enable yarnpkg repository
|
||||||
|
apt_repository: repo="deb https://dl.yarnpkg.com/debian/ stable main"
|
||||||
|
|
||||||
|
- name: Pin nodejs repository
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/apt/preferences.d/nodejs
|
||||||
|
create: yes
|
||||||
|
block: |
|
||||||
|
Package: *
|
||||||
|
Pin: origin deb.nodesource.com
|
||||||
|
Pin-Priority: 600
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
apt: name={{ item }}
|
apt: name={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
@ -20,11 +35,16 @@
|
|||||||
- nodejs
|
- nodejs
|
||||||
- postgresql
|
- postgresql
|
||||||
- python-psycopg2
|
- python-psycopg2
|
||||||
|
- yarn
|
||||||
|
|
||||||
- name: Unpack hackmd
|
- name: Unpack hackmd
|
||||||
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 }}
|
unarchive: src={{ hackmd_archive }} dest=/opt owner=hackmd group=hackmd remote_src=yes creates=/opt/codimd-{{ hackmd_version }}
|
||||||
register: hackmd_unarchive
|
register: hackmd_unarchive
|
||||||
|
|
||||||
|
- name: Rename hackmd
|
||||||
|
command: mv /opt/server-{{ hackmd_version }} /opt/codimd-{{ hackmd_version }}
|
||||||
|
when: hackmd_unarchive.changed
|
||||||
|
|
||||||
- name: Create hackmd upload path
|
- name: Create hackmd upload path
|
||||||
file: path=/opt/codimd/uploads state=directory recurse=yes owner=hackmd group=hackmd
|
file: path=/opt/codimd/uploads state=directory recurse=yes owner=hackmd group=hackmd
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"sessionSecret": "{{ hackmd_secret }}",
|
"sessionSecret": "{{ hackmd_secret }}",
|
||||||
"hsts": {
|
"hsts": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"maxAgeSeconds": "2592000",
|
"maxAgeSeconds": 2592000,
|
||||||
"includeSubdomains": true,
|
"includeSubdomains": true,
|
||||||
"preload": true
|
"preload": true
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user