From 6dc97b3e9c204c91ac1317e9dc906514fb104fcb Mon Sep 17 00:00:00 2001 From: meaz Date: Sat, 13 Jul 2024 10:25:38 +0200 Subject: [PATCH] remove modules (#28) Add possibility to remove modules Co-authored-by: muppeth Reviewed-on: https://git.disroot.org/Disroot-Ansible/etherpad/pulls/28 Reviewed-by: muppeth --- README.MD | 3 +-- defaults/main.yml | 2 +- tasks/modules.yml | 12 ++++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.MD b/README.MD index 89d7da7..bd80b80 100644 --- a/README.MD +++ b/README.MD @@ -19,10 +19,9 @@ 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..1f7b761 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -59,7 +59,7 @@ etherpad_apt: 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/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