From 8beadae205d6f4296afd399f0758c3f08844fa27 Mon Sep 17 00:00:00 2001 From: meaz Date: Tue, 6 Aug 2024 21:19:52 +0200 Subject: [PATCH] Update to 2.1.1 (#30) To be merged before deployment on prod. Co-authored-by: muppeth Reviewed-on: https://git.disroot.org/Disroot-Ansible/etherpad/pulls/30 Reviewed-by: muppeth Co-authored-by: meaz Co-committed-by: meaz --- Playbooks/etherpad.yml | 1 + README.MD | 5 ++--- defaults/main.yml | 9 +++++---- tasks/installdeps.yml | 12 ------------ tasks/modules.yml | 12 ++++++++++++ 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Playbooks/etherpad.yml b/Playbooks/etherpad.yml index 1c1a806..ac9c99c 100644 --- a/Playbooks/etherpad.yml +++ b/Playbooks/etherpad.yml @@ -3,6 +3,7 @@ - hosts: etherpad roles: - mariadb + - node - etherpad vars_files: diff --git a/README.MD b/README.MD index 89d7da7..70a95b0 100644 --- a/README.MD +++ b/README.MD @@ -12,17 +12,16 @@ Then you can access etherpad from your computer on http://192.168.33.8:9001 ## Playbook -The playbook includes mariadb role and deploys entire stack needed to run Etherpad-lite. Additional role is also available in the Ansible roles repos in git. +The playbook includes mariadb and node roles and deploys entire stack needed to run Etherpad-lite. Additional roles are also available in the Ansible roles repos in git. ## Tags You can use tags when you deploy: - `config`: to deploy just config - `modules`: to deploy modules -⚠ Since the v.2.0.2, modules can only be installed, not removed. The devs are working on this: https://github.com/ether/etherpad-lite/issues/6272 So if you need to remove a plugin, log into the admin interface. - ## CHANGELOG +- **09.06.2024** - Add possibility to remove plugin - **14.04.2024** - Bumped version to 2.0.2 and change from npm to pnpm - **26.03.2021** - Bumped version to 1.8.13 and enable ep_adminpads2 - **04.03.2021** - Bumped version to 1.8.11 and adjusted readme file diff --git a/defaults/main.yml b/defaults/main.yml index 467bd11..372d4d3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- -etherpad_version: '2.1.0' +etherpad_version: '2.1.1' etherpad_skin: 'colibris' etherpad_skinVariants: 'super-light-toolbar super-light-editor light-background' etherpad_username: 'etherpad' @@ -51,15 +51,16 @@ etherpad_smtp_host: 'localhost' etherpad_smtp_port: '587' etherpad_smtp_user: 'support' etherpad_smtp_pass: 'changeme' -etherpad_nodejs_version: '21' etherpad_apt: - curl - - nodejs - git +# Nodejs +nodejs_version: '21' + etherpad_admin_page: 'true' # set to something else if you don't want to build admin page -etherpad_plugins_list: +etherpad_plugins_list: # set to "removed" if you want to remove à plugin ep_adminpads2: enabled ep_comments_page: enabled ep_desktop_notifications: enabled diff --git a/tasks/installdeps.yml b/tasks/installdeps.yml index 3264edd..bc6456e 100644 --- a/tasks/installdeps.yml +++ b/tasks/installdeps.yml @@ -1,17 +1,5 @@ --- -- name: '[INSTALL] - Add Nodesource apt key.' - apt_key: - url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key - state: present - -- name: '[INSTALLDEPS] - Add repository for nodejs' - apt_repository: - repo: deb https://deb.nodesource.com/node_{{ etherpad_nodejs_version }}.x nodistro main - state: present - update_cache: yes - filename: 'nodesource' - - name: '[INSTALLDEPS] - Install dependencies' apt: name: "{{ etherpad_apt }}" diff --git a/tasks/modules.yml b/tasks/modules.yml index 419022c..fc5c35b 100644 --- a/tasks/modules.yml +++ b/tasks/modules.yml @@ -11,6 +11,18 @@ become: yes become_user: "{{ etherpad_username }}" when: etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'enabled') |length > 0 + notify: + restart etherpad + tags: modules + +- name: '[Modules] - Remove modules' + shell: + cmd: "pnpm run plugins rm {{ etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'removed') | map(attribute='key') |join(',') | replace(\",\", \" \") }}" + args: + chdir: "{{ etherpad_app_dir }}/app" + become: yes + become_user: "{{ etherpad_username }}" + when: etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'removed') |length > 0 notify: restart etherpad tags: modules \ No newline at end of file