infra/roles/etherpad/tasks/main.yml

46 lines
968 B
YAML
Raw Normal View History

2020-09-29 00:13:52 +02:00
---
- name: ensure etherpad user is present
user:
name: "etherpad"
home: "/srv/etherpad"
shell: "/bin/bash"
state: present
- name: ensure etherpad is latest
git:
repo: "https://github.com/ether/etherpad-lite"
dest: "/srv/etherpad/etherpad"
version: "master"
become: true
become_user: "etherpad"
register: repository
- name: ensure etherpad systemd unit is latest
template:
src: etherpad.service.j2
dest: /etc/systemd/system/etherpad.service
2020-09-29 00:13:52 +02:00
owner: root
group: root
mode: 0644
- name: ensure etherpad will start after system is booted
service:
name: etherpad
2020-09-29 00:13:52 +02:00
enabled: yes
- name: install etherpad deps
shell: installDeps.sh
args:
chdir: /srv/etherpad/etherpad/bin
2020-09-29 00:13:52 +02:00
- name: install etherpad plugins
npm:
name: "{{ item }}"
path: "/srv/etherpad/etherpad"
2020-09-29 00:13:52 +02:00
become: true
become_user: etherpad
with_items: "{{ plugins|d() }}"
notify: restart etherpad
2020-09-29 00:13:52 +02:00
- include: abiword.yml