2019-02-05 08:35:45 +01:00
|
|
|
---
|
|
|
|
# Install APT dependencies
|
|
|
|
- include_tasks: 0_apt_dependencies.yml
|
|
|
|
|
|
|
|
# Create EtherPad user and group
|
|
|
|
- include_tasks: 1_user_group.yml
|
|
|
|
|
|
|
|
# Download EtherPad
|
|
|
|
- name: Clone EtherPad project
|
|
|
|
git:
|
2019-02-19 10:49:18 +01:00
|
|
|
repo: https://github.com/ether/etherpad-lite.git
|
|
|
|
dest: /var/local/etherpad/etherpad-lite
|
2019-02-05 08:35:45 +01:00
|
|
|
version: master
|
|
|
|
become: true
|
|
|
|
become_user: etherpad
|
|
|
|
|
|
|
|
# Installation script
|
|
|
|
# TODO: move this in a handler
|
|
|
|
- name: Install Etherpad dependencies
|
|
|
|
command: bin/installDeps.sh
|
|
|
|
args:
|
2019-02-19 10:49:18 +01:00
|
|
|
chdir: /var/local/etherpad/etherpad-lite
|
2019-02-05 08:35:45 +01:00
|
|
|
become: true
|
|
|
|
become_user: etherpad
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
- name: Configure EtherPad
|
|
|
|
lineinfile:
|
2019-02-19 10:49:18 +01:00
|
|
|
dest: /var/local/etherpad/etherpad-lite/settings.json
|
2019-02-05 08:35:45 +01:00
|
|
|
regexp: '^\s*"{{ item.key }}"'
|
|
|
|
line: "{{ item.value }}"
|
|
|
|
with_dict:
|
|
|
|
title: " \"title\": \"Etherpad Aurore\","
|
|
|
|
dbType: " \"dbType\" : \"postgres\","
|
2019-03-11 18:15:17 +01:00
|
|
|
defaultPadText: " \"defaultPadText\" : \"Bienvenue sur l'EtherPad d'Aurore !\\n\\nCe pad est public.\\n\","
|
2019-02-05 08:35:45 +01:00
|
|
|
lang: " \"lang\": \"fr-fr\""
|
|
|
|
|
|
|
|
# Service file
|
|
|
|
- name: Install EtherPad systemd unit
|
|
|
|
template:
|
2019-02-19 10:49:18 +01:00
|
|
|
src: systemd/etherpad-lite.service.j2
|
|
|
|
dest: /etc/systemd/system/etherpad-lite.service
|
2019-02-05 08:35:45 +01:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: Reload systemd daemons
|
|
|
|
|
|
|
|
# Run
|
|
|
|
- name: Ensure that EtherPad is started
|
|
|
|
service:
|
|
|
|
name: etherpad-lite
|
|
|
|
state: started
|
|
|
|
enabled: True
|
|
|
|
|
|
|
|
# La configuration de la clé `dbSettings` n'est pas encore automatisé !
|
|
|
|
|
|
|
|
# TODO-list
|
|
|
|
# * Configure admin user, logs
|
|
|
|
# Plugins : https://framacloud.org/fr/cultiver-son-jardin/etherpad.html#concernant-framapad
|