fully working etherpad role with minimal deps
This commit is contained in:
parent
1f07accf2f
commit
17e289641a
7 changed files with 44 additions and 23 deletions
7
etherpad-playbook.yml
Normal file
7
etherpad-playbook.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: "Testing etherpad role"
|
||||||
|
hosts: localhost
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- role: etherpad
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: nodejs test
|
|
||||||
hosts: all
|
|
||||||
roles:
|
|
||||||
- nodejs
|
|
|
@ -14,7 +14,7 @@ caddy_http2_enabled: "true"
|
||||||
# additional cli args to pass to caddy
|
# additional cli args to pass to caddy
|
||||||
caddy_additional_args: ""
|
caddy_additional_args: ""
|
||||||
caddy_systemd_network_dependency: true
|
caddy_systemd_network_dependency: true
|
||||||
caddy_systemd_capabilities_enabled: false
|
caddy_systemd_capabilities_enabled: true
|
||||||
caddy_systemd_capabilities: "CAP_NET_BIND_SERVICE"
|
caddy_systemd_capabilities: "CAP_NET_BIND_SERVICE"
|
||||||
caddy_systemd_restart: "on-failure" # always, on-success, on-failure, on-abnormal, on-abort, on-watchdog
|
caddy_systemd_restart: "on-failure" # always, on-success, on-failure, on-abnormal, on-abort, on-watchdog
|
||||||
caddy_systemd_restart_startlimitinterval: "86400"
|
caddy_systemd_restart_startlimitinterval: "86400"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "Etherpad"
|
title: "Etherpad"
|
||||||
favicon: "favicon.ico"
|
favicon: "favicon.ico"
|
||||||
hostname: "0.0.0.0"
|
hostname: ":80"
|
||||||
database_password: "{{lookup('password', './database_password')}}"
|
database_password: "{{lookup('password', './database_password')}}"
|
||||||
pad_options_lang: 'it-it'
|
pad_options_lang: 'it-it'
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ pad_default_text: |
|
||||||
Welcome to Etherpad!
|
Welcome to Etherpad!
|
||||||
This pad text is synchronized as you type, so that everyone viewing this page sees the same text.
|
This pad text is synchronized as you type, so that everyone viewing this page sees the same text.
|
||||||
This allows you to collaborate seamlessly on documents!
|
This allows you to collaborate seamlessly on documents!
|
||||||
Get involved with Etherpad at"
|
Get involved with Etherpad at
|
|
@ -1,13 +1,21 @@
|
||||||
---
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
||||||
|
# install nodejs
|
||||||
- role: nodejs
|
- role: nodejs
|
||||||
|
|
||||||
|
# install postgres
|
||||||
|
# and create an etherpad user and db
|
||||||
- role: postgresql
|
- role: postgresql
|
||||||
vars:
|
vars:
|
||||||
username: etherpad
|
username: etherpad
|
||||||
password: "{{ database_password }}"
|
password: "{{ database_password }}"
|
||||||
database: etherpad
|
database: etherpad
|
||||||
|
|
||||||
|
# install caddy and configure it as reverse proxy
|
||||||
- role: caddy
|
- role: caddy
|
||||||
vars:
|
vars:
|
||||||
caddyfile: |
|
caddy_config: |
|
||||||
http://{{hostname}}:80
|
{{hostname}}
|
||||||
reverse_proxy / /tmp/etherpad.socket"
|
encode gzip
|
||||||
|
reverse_proxy localhost:31337
|
|
@ -23,15 +23,26 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
- 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
|
- name: ensure etherpad will start after system is booted
|
||||||
service:
|
service:
|
||||||
name: etherpad
|
name: etherpad
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
- name: install etherpad deps
|
- name: install etherpad deps
|
||||||
shell: installDeps.sh
|
become: true
|
||||||
|
become_user: etherpad
|
||||||
|
shell: /srv/etherpad/etherpad/bin/installDeps.sh
|
||||||
args:
|
args:
|
||||||
chdir: /srv/etherpad/etherpad/bin
|
chdir: /srv/etherpad/etherpad/
|
||||||
|
|
||||||
- name: install etherpad plugins
|
- name: install etherpad plugins
|
||||||
npm:
|
npm:
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
{
|
{
|
||||||
"title": "{{ title }}",
|
"title": "{{ title }}",
|
||||||
"favicon": "{{ favicon }}",
|
"favicon": "{{ favicon }}",
|
||||||
"ip": "",
|
"ip": "127.0.0.1",
|
||||||
"port" : "/tmp/etherpad.socket",
|
"port" : "31337",
|
||||||
"showSettingsInAdminPage": false,
|
"showSettingsInAdminPage": false,
|
||||||
"sessionKey": "{{ etherpad.session_key }}",
|
"sessionKey": "oijaoifd",
|
||||||
"skinName": "colibris",
|
"skinName": "colibris",
|
||||||
"dbType": "postgresql",
|
"dbType": "postgres",
|
||||||
"dbSettings" : {
|
"dbSettings" : {
|
||||||
"user" : "etherpad",
|
"user" : "etherpad",
|
||||||
"host" : "/var/run/postgresql",
|
"host" : "/var/run/postgresql",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"database": "etherpad",
|
"database": "etherpad",
|
||||||
"charset" : "utf8mb4"
|
"charset" : "utf8mb4"
|
||||||
},
|
},
|
||||||
"defaultPadText": "{{ pad_default_text }}",
|
"defaultPadText": "{{ pad_default_text | replace("\n", "\\n")}}",
|
||||||
"padOptions": {
|
"padOptions": {
|
||||||
"noColors": false,
|
"noColors": false,
|
||||||
"showControls": true,
|
"showControls": true,
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
"cmdH": true,
|
"cmdH": true,
|
||||||
"ctrlHome": true,
|
"ctrlHome": true,
|
||||||
"pageUp": true,
|
"pageUp": true,
|
||||||
"pageDown": true}
|
"pageDown": true
|
||||||
},
|
},
|
||||||
"suppressErrorsInPadText": false,
|
"suppressErrorsInPadText": false,
|
||||||
"requireSession": false,
|
"requireSession": false,
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
"minify": true,
|
"minify": true,
|
||||||
"maxAge": 21600,
|
"maxAge": 21600,
|
||||||
"abiword": "/usr/bin/abiword",
|
"abiword": "/usr/bin/abiword",
|
||||||
"soffice": "/usr/bin/soffice",
|
"soffice": false,
|
||||||
"tidyHtml": "/usr/bin/tidy",
|
"tidyHtml": "/usr/bin/tidy",
|
||||||
"allowUnknownFileEnds": true,
|
"allowUnknownFileEnds": true,
|
||||||
"requireAuthentication": false,
|
"requireAuthentication": false,
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
"scrollWhenCaretIsInTheLastLineOfViewport": false,
|
"scrollWhenCaretIsInTheLastLineOfViewport": false,
|
||||||
"percentageToScrollWhenUserPressesArrowUp": 0
|
"percentageToScrollWhenUserPressesArrowUp": 0
|
||||||
},
|
},
|
||||||
"socketTransportProtocols": : ["xhr-polling", "jsonp-polling", "htmlfile"],
|
"socketTransportProtocols": ["xhr-polling", "jsonp-polling", "htmlfile"],
|
||||||
"loadTest": false,
|
"loadTest": false,
|
||||||
"indentationOnNewLine": false,
|
"indentationOnNewLine": false,
|
||||||
"toolbar": {
|
"toolbar": {
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
"timeslider": [
|
"timeslider": [
|
||||||
["timeslider_export", "timeslider_returnToPad"]
|
["timeslider_export", "timeslider_returnToPad"]
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
"exposeVersion": false,
|
"exposeVersion": false,
|
||||||
"loglevel": "WARN",
|
"loglevel": "WARN"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue