Move roles/matrix* to roles/custom/matrix*
This paves the way for installing other roles into `roles/galaxy` using `ansible-galaxy`, similar to how it's done in: - https://github.com/spantaleev/gitea-docker-ansible-deploy - https://github.com/spantaleev/nextcloud-docker-ansible-deploy In the near future, we'll be removing a lot of the shared role code from here and using upstream roles for it. Some of the core `matrix-*` roles have already been extracted out into other reusable roles: - https://github.com/devture/com.devture.ansible.role.postgres - https://github.com/devture/com.devture.ansible.role.systemd_docker_base - https://github.com/devture/com.devture.ansible.role.timesync - https://github.com/devture/com.devture.ansible.role.vars_preserver - https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages - https://github.com/devture/com.devture.ansible.role.playbook_help We just need to migrate to those.
This commit is contained in:
116
roles/custom/matrix-etherpad/templates/settings.json.j2
Normal file
116
roles/custom/matrix-etherpad/templates/settings.json.j2
Normal file
@ -0,0 +1,116 @@
|
||||
{
|
||||
"title": {{ matrix_etherpad_title|to_json }},
|
||||
"favicon": "favicon.ico",
|
||||
"skinName": "colibris",
|
||||
"skinVariants": "super-light-toolbar super-light-editor light-background",
|
||||
"ip": "::",
|
||||
"port": 9001,
|
||||
"showSettingsInAdminPage": true,
|
||||
"dbType": {{ matrix_etherpad_database_engine|to_json }},
|
||||
"dbSettings": {
|
||||
"database": {{ matrix_etherpad_database_name|to_json }},
|
||||
"host": {{ matrix_etherpad_database_hostname|to_json }},
|
||||
"password": {{ matrix_etherpad_database_password|to_json }},
|
||||
"port": {{ matrix_etherpad_database_port|to_json }},
|
||||
"user": {{ matrix_etherpad_database_username|to_json }}
|
||||
},
|
||||
"defaultPadText" : {{ matrix_etherpad_default_pad_text|to_json }},
|
||||
"suppressErrorsInPadText": false,
|
||||
"requireSession": false,
|
||||
"editOnly": false,
|
||||
"minify": true,
|
||||
"maxAge": 21600,
|
||||
"abiword": null,
|
||||
"soffice": null,
|
||||
"tidyHtml": null,
|
||||
"allowUnknownFileEnds": true,
|
||||
"requireAuthentication": false,
|
||||
"requireAuthorization": false,
|
||||
"trustProxy": true,
|
||||
"cookie": {
|
||||
"sameSite": "Lax"
|
||||
},
|
||||
"disableIPlogging": true,
|
||||
"automaticReconnectionTimeout": 0,
|
||||
"scrollWhenFocusLineIsOutOfViewport": {
|
||||
"percentage": {
|
||||
"editionAboveViewport": 0,
|
||||
"editionBelowViewport": 0
|
||||
},
|
||||
"duration": 0,
|
||||
"scrollWhenCaretIsInTheLastLineOfViewport": false,
|
||||
"percentageToScrollWhenUserPressesArrowUp": 0
|
||||
},
|
||||
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
|
||||
"socketIo": {
|
||||
"maxHttpBufferSize": 10000
|
||||
},
|
||||
"loadTest": false,
|
||||
"dumpOnUncleanExit": false,
|
||||
"indentationOnNewLine": false,
|
||||
"importExportRateLimiting": {
|
||||
"windowMs": 90000,
|
||||
"max": 10
|
||||
},
|
||||
"importMaxFileSize": 52428800,
|
||||
"commitRateLimiting": {
|
||||
"duration": 1,
|
||||
"points": 10
|
||||
},
|
||||
"exposeVersion": false,
|
||||
"padOptions": {
|
||||
"noColors": false,
|
||||
"showControls": true,
|
||||
"showChat": false,
|
||||
"showLineNumbers": true,
|
||||
"useMonospaceFont": false,
|
||||
"userName": false,
|
||||
"userColor": false,
|
||||
"rtl": false,
|
||||
"alwaysShowChat": false,
|
||||
"chatAndUsers": false,
|
||||
"lang": "en-gb"
|
||||
},
|
||||
{% if matrix_etherpad_admin_username != "" and matrix_etherpad_admin_password != "" %}
|
||||
"users": {
|
||||
{{ matrix_etherpad_admin_username|to_json }}: {
|
||||
"password": {{ matrix_etherpad_admin_password|to_json }},
|
||||
"is_admin": true
|
||||
}
|
||||
},
|
||||
{% endif %}
|
||||
"padShortcutEnabled" : {
|
||||
"altF9": true,
|
||||
"altC": true,
|
||||
"cmdShift2": true,
|
||||
"delete": true,
|
||||
"return": true,
|
||||
"esc": true,
|
||||
"cmdS": true,
|
||||
"tab": true,
|
||||
"cmdZ": true,
|
||||
"cmdY": true,
|
||||
"cmdI": true,
|
||||
"cmdB": true,
|
||||
"cmdU": true,
|
||||
"cmd5": true,
|
||||
"cmdShiftL": true,
|
||||
"cmdShiftN": true,
|
||||
"cmdShift1": true,
|
||||
"cmdShiftC": true,
|
||||
"cmdH": true,
|
||||
"ctrlHome": true,
|
||||
"pageUp": true,
|
||||
"pageDown": true
|
||||
},
|
||||
"loglevel": "INFO",
|
||||
"logconfig" :
|
||||
{ "appenders": [
|
||||
{ "type": "console",
|
||||
"layout": {"type": "messagePassThrough"}
|
||||
}
|
||||
]
|
||||
},
|
||||
"customLocaleStrings": {},
|
||||
"enableAdminUITests": false
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
[Unit]
|
||||
Description=Matrix Etherpad
|
||||
{% for service in matrix_etherpad_systemd_required_services_list %}
|
||||
Requires={{ service }}
|
||||
After={{ service }}
|
||||
{% endfor %}
|
||||
{% for service in matrix_etherpad_systemd_wanted_services_list %}
|
||||
Wants={{ service }}
|
||||
{% endfor %}
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="HOME={{ matrix_systemd_unit_home_path }}"
|
||||
ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-etherpad
|
||||
ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-etherpad
|
||||
|
||||
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-etherpad \
|
||||
--log-driver=none \
|
||||
--user={{ matrix_etherpad_user_uid }}:{{ matrix_etherpad_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--network={{ matrix_docker_network }} \
|
||||
{% if matrix_etherpad_container_http_host_bind_port %}
|
||||
-p {{ matrix_etherpad_container_http_host_bind_port }}:9001 \
|
||||
{% endif %}
|
||||
--mount type=bind,src={{ matrix_etherpad_base_path }},dst=/data \
|
||||
{% for arg in matrix_etherpad_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_etherpad_docker_image }} \
|
||||
node --experimental-worker src/node/server.js \
|
||||
--settings /data/settings.json --credentials /data/credentials.json \
|
||||
--sessionkey /data/sessionkey.json --apikey /data/apijey.json
|
||||
|
||||
|
||||
ExecStop=-{{ matrix_host_command_docker }} kill matrix-etherpad
|
||||
ExecStop=-{{ matrix_host_command_docker }} rm matrix-etherpad
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
SyslogIdentifier=matrix-etherpad
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user