|
@@ -1,6 +1,7 @@
|
|
|
---
|
|
|
|
|
|
- name: install etherpad deps
|
|
|
+ become: yes
|
|
|
apt:
|
|
|
pkg:
|
|
|
- git
|
|
@@ -8,6 +9,7 @@
|
|
|
- tidy
|
|
|
|
|
|
- name: ensure etherpad user is present
|
|
|
+ become: yes
|
|
|
user:
|
|
|
name: "etherpad"
|
|
|
home: "/srv/etherpad"
|
|
@@ -18,13 +20,14 @@
|
|
|
git:
|
|
|
repo: "https://github.com/ether/etherpad-lite"
|
|
|
dest: "/srv/etherpad/etherpad"
|
|
|
- version: "1.8.6"
|
|
|
+ version: "1.8.7"
|
|
|
force: true
|
|
|
become: true
|
|
|
become_user: "etherpad"
|
|
|
register: repository
|
|
|
|
|
|
- name: ensure etherpad init.d is latest
|
|
|
+ become: yes
|
|
|
template:
|
|
|
src: etherpad.initd.j2
|
|
|
dest: /etc/init.d/etherpad
|
|
@@ -33,6 +36,7 @@
|
|
|
mode: 0500
|
|
|
|
|
|
- name: copy etherpad settings.json
|
|
|
+ become: yes
|
|
|
template:
|
|
|
src: settings.json.j2
|
|
|
dest: /srv/etherpad/etherpad/settings.json
|
|
@@ -41,6 +45,7 @@
|
|
|
mode: 0644
|
|
|
|
|
|
- name: ensure etherpad will start after system is booted
|
|
|
+ become: yes
|
|
|
service:
|
|
|
name: etherpad
|
|
|
enabled: yes
|
|
@@ -53,19 +58,20 @@
|
|
|
# chdir: /srv/etherpad/etherpad/
|
|
|
|
|
|
- name: copy custom assets
|
|
|
+ become: yes
|
|
|
copy:
|
|
|
src: "{{playbook_dir}}/assets/etherpad/{{item.key}}"
|
|
|
dest: "{{item.value}}{{item.key}}"
|
|
|
owner: etherpad
|
|
|
group: etherpad
|
|
|
- with_dict: "{{ override_files }}"
|
|
|
+ with_dict: "{{ override_files| default([]) }}"
|
|
|
|
|
|
- name: remove package-lock.json
|
|
|
+ become: yes
|
|
|
file:
|
|
|
state: absent
|
|
|
path: "/srv/etherpad/etherpad/package-lock.json"
|
|
|
|
|
|
-
|
|
|
- name: install etherpad plugins
|
|
|
npm:
|
|
|
name: "{{ item }}"
|
|
@@ -73,4 +79,9 @@
|
|
|
become: true
|
|
|
become_user: etherpad
|
|
|
with_items: "{{ plugins|d() }}"
|
|
|
- notify: restart etherpad
|
|
|
+
|
|
|
+- name: restart etherpad
|
|
|
+ become: true
|
|
|
+ service:
|
|
|
+ name: etherpad
|
|
|
+ state: restarted
|