Etherpad role
parent
b1f1de3a9c
commit
cfac25a515
1
base.yml
1
base.yml
|
@ -81,4 +81,5 @@
|
||||||
- import_playbook: plays/wireguard.yml
|
- import_playbook: plays/wireguard.yml
|
||||||
- import_playbook: plays/mirror.yml
|
- import_playbook: plays/mirror.yml
|
||||||
- import_playbook: plays/owncloud.yml
|
- import_playbook: plays/owncloud.yml
|
||||||
|
- import_playbook: plays/etherpad.yml
|
||||||
- import_playbook: plays/reverse-proxy.yml
|
- import_playbook: plays/reverse-proxy.yml
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
---
|
||||||
|
# Deploy EtherPad
|
||||||
|
- hosts: kenobi.adm.crans.org
|
||||||
|
roles:
|
||||||
|
- etherpad
|
|
@ -0,0 +1,43 @@
|
||||||
|
---
|
||||||
|
- name: Install Etherpad dependencies
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
name:
|
||||||
|
- libssl-dev
|
||||||
|
- pkg-config
|
||||||
|
- build-essential
|
||||||
|
- nodejs
|
||||||
|
register: apt_result
|
||||||
|
retries: 3
|
||||||
|
until: apt_result is succeeded
|
||||||
|
|
||||||
|
- name: Clone EtherPad
|
||||||
|
git:
|
||||||
|
repo: https://github.com/ether/etherpad-lite.git
|
||||||
|
dest: /var/www/etherpad-lite
|
||||||
|
version: 1.8.4
|
||||||
|
become: true
|
||||||
|
become_user: etherpad
|
||||||
|
|
||||||
|
#- name: Configure EtherPad
|
||||||
|
# template:
|
||||||
|
# src: etherpad/settings.json.j2
|
||||||
|
# dest: /var/www/etherpad-lite/settings.json
|
||||||
|
|
||||||
|
- name: Install EtherPad systemd unit
|
||||||
|
template:
|
||||||
|
src: systemd/system/etherpad-lite.service.j2
|
||||||
|
dest: /etc/systemd/system/etherpad-lite.service
|
||||||
|
|
||||||
|
- name: Activate EtherPad service
|
||||||
|
systemd:
|
||||||
|
daemon_reload: true
|
||||||
|
name: etherpad
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
|
|
||||||
|
- name: Indicate role in motd
|
||||||
|
template:
|
||||||
|
src: update-motd.d/05-service.j2
|
||||||
|
dest: /etc/update-motd.d/05-etherpad
|
||||||
|
mode: 0755
|
|
@ -0,0 +1,17 @@
|
||||||
|
{{ ansible_header | comment }}
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=etherpad-lite (real-time collaborative document editing)
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=etherpad
|
||||||
|
Group=etherpad
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
ExecStart=/var/www/etherpad-lite/bin/run.sh --stack-size=4096
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/tail +14
|
||||||
|
{{ ansible_header | comment }}
|
||||||
|
[0m> [38;5;82mEtherPad[0m a été déployé sur cette machine. Voir [38;5;6m/var/www/etherpad-lite/[0m.
|
Loading…
Reference in New Issue