1
0
Atdalīts 0
atdalīts no cisti/infra
infra/roles/stable/etherpad/tasks/main.yml
2020-11-10 23:14:10 +01:00

76 rindas
1,6 KiB
YAML

---
- name: install etherpad deps
apt:
pkg:
- git
- libreoffice-common
- tidy
- name: ensure etherpad user is present
user:
name: "etherpad"
home: "/srv/etherpad"
shell: "/bin/bash"
state: present
- name: ensure etherpad is correct version
git:
repo: "https://github.com/ether/etherpad-lite"
dest: "/srv/etherpad/etherpad"
version: "1.8.6"
force: true
become: true
become_user: "etherpad"
register: repository
- name: ensure etherpad init.d is latest
template:
src: etherpad.initd.j2
dest: /etc/init.d/etherpad
owner: root
group: root
mode: 0500
- name: copy etherpad settings.json
template:
src: settings.json.j2
dest: /srv/etherpad/etherpad/settings.json
owner: etherpad
group: etherpad
mode: 0644
- name: ensure etherpad will start after system is booted
service:
name: etherpad
enabled: yes
# - name: install etherpad deps
# become: true
# become_user: etherpad
# shell: /srv/etherpad/etherpad/bin/installDeps.sh
# args:
# chdir: /srv/etherpad/etherpad/
- name: copy custom assets
copy:
src: "{{playbook_dir}}/assets/etherpad/{{item.key}}"
dest: "{{item.value}}{{item.key}}"
owner: etherpad
group: etherpad
with_dict: "{{ override_files }}"
- name: remove package-lock.json
file:
state: absent
path: "/srv/etherpad/etherpad/package-lock.json"
- name: install etherpad plugins
npm:
name: "{{ item }}"
path: "/srv/etherpad/etherpad"
become: true
become_user: etherpad
with_items: "{{ plugins|d() }}"
notify: restart etherpad