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