Etherpad role

certbot_on_virtu
Alexandre Iooss 2020-07-26 22:48:36 +02:00
parent b1f1de3a9c
commit cfac25a515
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
5 changed files with 70 additions and 0 deletions

View File

@ -81,4 +81,5 @@
- import_playbook: plays/wireguard.yml
- import_playbook: plays/mirror.yml
- import_playbook: plays/owncloud.yml
- import_playbook: plays/etherpad.yml
- import_playbook: plays/reverse-proxy.yml

View File

@ -0,0 +1,6 @@
#!/usr/bin/env ansible-playbook
---
# Deploy EtherPad
- hosts: kenobi.adm.crans.org
roles:
- etherpad

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,3 @@
#!/usr/bin/tail +14
{{ ansible_header | comment }}
> EtherPad a été déployé sur cette machine. Voir /var/www/etherpad-lite/.