forked from infra/ansible
hackmd: update version to codimd 1.2.1
This commit is contained in:
parent
ebecd957b2
commit
9b19d93bf9
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
hackmd_version: 1.1.1-ce
|
hackmd_version: 1.2.1
|
||||||
|
@ -22,21 +22,21 @@
|
|||||||
- python-psycopg2
|
- python-psycopg2
|
||||||
|
|
||||||
- name: Unpack hackmd
|
- name: Unpack hackmd
|
||||||
unarchive: src=https://github.com/hackmdio/hackmd/archive/{{hackmd_version}}.tar.gz dest=/opt owner=hackmd remote_src=yes creates=/opt/hackmd-{{hackmd_version}}
|
unarchive: src=https://github.com/hackmdio/codimd/archive/{{ hackmd_version }}.tar.gz dest=/opt owner=hackmd remote_src=yes creates=/opt/codimd-{{ hackmd_version }}
|
||||||
register: hackmd_unarchive
|
register: hackmd_unarchive
|
||||||
|
|
||||||
- name: Setup hackmd
|
- name: Setup hackmd
|
||||||
command: bin/setup chdir=/opt/hackmd-{{hackmd_version}} creates=/opt/hackmd-{{hackmd_version}}/config.json
|
command: bin/setup chdir=/opt/codimd-{{ hackmd_version }} creates=/opt/codimd-{{ hackmd_version }}/config.json
|
||||||
become: true
|
become: true
|
||||||
become_user: hackmd
|
become_user: hackmd
|
||||||
|
|
||||||
- name: Configure hackmd
|
- name: Configure hackmd
|
||||||
template: src=config.json.j2 dest=/opt/hackmd-{{hackmd_version}}/config.json owner=hackmd
|
template: src=config.json.j2 dest=/opt/codimd-{{ hackmd_version }}/config.json owner=hackmd
|
||||||
register: hackmd_config
|
register: hackmd_config
|
||||||
notify: Restart hackmd
|
notify: Restart hackmd
|
||||||
|
|
||||||
- name: Build hackmd frontend
|
- name: Build hackmd frontend
|
||||||
command: /usr/bin/npm run build chdir=/opt/hackmd-{{hackmd_version}}
|
command: /usr/bin/npm run build chdir=/opt/codimd-{{ hackmd_version }}
|
||||||
become: true
|
become: true
|
||||||
become_user: hackmd
|
become_user: hackmd
|
||||||
when: (hackmd_unarchive is defined and hackmd_unarchive.changed) or (hackmd_config is defined and hackmd_config.changed)
|
when: (hackmd_unarchive is defined and hackmd_unarchive.changed) or (hackmd_config is defined and hackmd_config.changed)
|
||||||
|
@ -4,10 +4,10 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
WorkingDirectory=/opt/hackmd-{{hackmd_version}}
|
WorkingDirectory=/opt/codimd-{{ hackmd_version }}
|
||||||
Type=simple
|
Type=simple
|
||||||
User=hackmd
|
User=hackmd
|
||||||
ExecStart=/usr/bin/node /opt/hackmd-{{hackmd_version}}/app.js
|
ExecStart=/usr/bin/node /opt/codimd-{{ hackmd_version }}/app.js
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user