From ddc835a399feb5fe0308a41dd56a7ba4dd01a616 Mon Sep 17 00:00:00 2001 From: meaz Date: Sun, 9 Jun 2024 10:12:09 +0200 Subject: [PATCH] add task to remove modules --- tasks/modules.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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