diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-13 16:29:05 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-13 16:29:05 +0100 |
| commit | 954ab1887b20e9e0d5885c1cec8d71641cb3dcd4 (patch) | |
| tree | 45cb7191fe51f3fa099e8a01e5cd0a0c37e034ec /ansible/roles/etherpad | |
| parent | f9272fdf3ea23070583c944b110a7b8f16c5a4ff (diff) | |
remove homelab config
Diffstat (limited to 'ansible/roles/etherpad')
| -rw-r--r-- | ansible/roles/etherpad/tasks/main.yml | 65 | ||||
| -rw-r--r-- | ansible/roles/etherpad/templates/openrc/etherpad | 28 | ||||
| -rw-r--r-- | ansible/roles/etherpad/templates/settings.json | 134 |
3 files changed, 0 insertions, 227 deletions
diff --git a/ansible/roles/etherpad/tasks/main.yml b/ansible/roles/etherpad/tasks/main.yml deleted file mode 100644 index 185fe51..0000000 --- a/ansible/roles/etherpad/tasks/main.yml +++ /dev/null @@ -1,65 +0,0 @@ -- name: Install PNPM and Git - community.general.apk: - name: - - pnpm - - git - -- name: Install tsx globally - ansible.builtin.shell: pnpm install --global tsx - register: pnpm_install_tsx - changed_when: "'Already up to date' not in pnpm_install_tsx.stdout" - environment: - PNPM_HOME: "{{ ansible_facts.env.HOME }}/.local/share/pnpm" - PATH: "{{ ansible_facts.env.PATH }}:{{ ansible_facts.env.HOME }}/.local/share/pnpm" - -- name: Checkout source code for latest etherpad release - register: etherpad_src - ansible.builtin.git: - repo: https://github.com/ether/etherpad.git - dest: "{{ src_dir }}/etherpad" - depth: 1 - version: master - -- name: Install etherpad settings - register: etherpad_settings - ansible.builtin.template: - src: settings.json - dest: "{{ src_dir }}/etherpad/settings.json" - mode: "640" - -- name: Install etherpad dependencies - register: etherpad_dependencies - changed_when: "'Already up to date' not in etherpad_dependencies.stdout" - ansible.builtin.command: - chdir: "{{ src_dir }}/etherpad" - cmd: pnpm install - -- name: Install etherpad service - register: etherpad_service - ansible.builtin.template: - src: openrc/etherpad - dest: /etc/init.d/etherpad - mode: "755" - -- name: Restart etherpad service and configure to start on boot - when: - etherpad_src is changed - or etherpad_service is changed - or etherpad_settings is changed - or etherpad_dependencies is changed - ansible.builtin.service: - name: etherpad - enabled: true - state: restarted - -- name: Start etherpad service and configure to start on boot - when: - not ( - etherpad_src is changed - or etherpad_settings is changed - or etherpad_service is changed - or etherpad_dependencies is changed ) - ansible.builtin.service: - name: etherpad - enabled: true - state: started diff --git a/ansible/roles/etherpad/templates/openrc/etherpad b/ansible/roles/etherpad/templates/openrc/etherpad deleted file mode 100644 index f5f7260..0000000 --- a/ansible/roles/etherpad/templates/openrc/etherpad +++ /dev/null @@ -1,28 +0,0 @@ -#!/sbin/openrc-run - -description="Run etherpad document server" - -start() -{ - ebegin "Starting etherpad" - start-stop-daemon --start \ - --env NODE_ENV={{ etherpad_node_env }} \ - --exec /usr/bin/pnpx \ - --background \ - --chdir {{ src_dir }}/etherpad \ - --stdout /var/log/etherpad.log \ - --stderr /var/log/etherpad.log \ - --make-pidfile \ - --pidfile /run/etherpad.pid \ - -- tsx src/node/server.ts - eend $? -} - -stop() -{ - ebegin "Stopping etherpad" - start-stop-daemon --stop \ - --exec /usr/bin/pnpx \ - --pidfile /run/etherpad.pid - eend $? -} diff --git a/ansible/roles/etherpad/templates/settings.json b/ansible/roles/etherpad/templates/settings.json deleted file mode 100644 index 7818d93..0000000 --- a/ansible/roles/etherpad/templates/settings.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "title": "joeac's docs", - "showRecentPads": true, - "favicon": null, - "skinName": "colibris", - "skinVariants": "super-light-toolbar super-light-editor light-background", - "ip": "0.0.0.0", - "port": {{ services.etherpad.port }}, - "showSettingsInAdminPage": true, - "enableMetrics": "${ENABLE_METRICS:true}", - "cleanup": { - "enabled": false, - "keepRevisions": 5 - }, - "dbType": "sqlite", - "dbSettings": { - "filename": "var/sqlite.db" - }, - "defaultPadText" : "", - "padOptions": { - "noColors": false, - "showControls": true, - "showChat": true, - "showLineNumbers": true, - "useMonospaceFont": false, - "userName": null, - "userColor": null, - "rtl": false, - "alwaysShowChat": false, - "chatAndUsers": false, - "lang": null - }, - "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 - }, - "updateServer": "https://etherpad.org/ep_infos", - "suppressErrorsInPadText": false, - "requireSession": false, - "editOnly": false, - "minify": true, - "maxAge": 21600, - "soffice": null, - "docxExport": true, - "allowUnknownFileEnds": true, - "requireAuthentication": false, - "requireAuthorization": false, - "trustProxy": false, - "cookie": { - "keyRotationInterval": 86400000, - "sameSite": "Lax", - "sessionLifetime": 864000000, - "sessionRefreshInterval": 86400000, - "sessionCleanup": true - }, - "disableIPlogging": false, - "automaticReconnectionTimeout": 0, - "scrollWhenFocusLineIsOutOfViewport": { - "percentage": { - "editionAboveViewport": 0, - "editionBelowViewport": 0 - }, - "duration": 0, - "scrollWhenCaretIsInTheLastLineOfViewport": false, - "percentageToScrollWhenUserPressesArrowUp": 0 - }, - "users": { - "admin": { - "password": "{{ etherpad_admin_password }}", - "is_admin": true - } - }, - "socketTransportProtocols" : ["websocket", "polling"], - "socketIo": { - "maxHttpBufferSize": 1000000 - }, - "loadTest": false, - "dumpOnUncleanExit": false, - "importExportRateLimiting": { - "windowMs": 90000, - "max": 10 - }, - "importMaxFileSize": 52428800, // 50 * 1024 * 1024 - "authenticationMethod": "${AUTHENTICATION_METHOD:sso}", - "enableDarkMode": "${ENABLE_DARK_MODE:true}", - "enablePadWideSettings": "${ENABLE_PAD_WIDE_SETTINGS:false}", - "commitRateLimiting": { - "duration": 1, - "points": 10 - }, - "logLayoutType": "colored", - "customLocaleStrings": {}, - "enableAdminUITests": false, - "lowerCasePadIds": false, - "sso": { - "issuer": "${SSO_ISSUER:http://localhost:{{ services.etherpad.port }}}", - "clients": [ - { - "client_id": "${ADMIN_CLIENT:admin_client}", - "client_secret": "${ADMIN_SECRET:admin}", - "grant_types": ["authorization_code"], - "response_types": ["code"], - "redirect_uris": ["${ADMIN_REDIRECT:http://localhost:{{ services.etherpad.port }}/admin/}"] - }, - { - "client_id": "${USER_CLIENT:user_client}", - "client_secret": "${USER_SECRET:user}", - "grant_types": ["authorization_code"], - "response_types": ["code"], - "redirect_uris": ["${USER_REDIRECT:http://localhost:{{ services.etherpad.port }}/}"] - } - ] - } -} |
