etherpad/tasks/modules.yml
meaz 37f497d096 v1.9.2 (#12)
Please test also, coz I add issues before I found that problem with npm / modules, so I hope this fixes it (though I think it does, it works on vagrant and on home machine)

Co-authored-by: meaz <meaz@disroot.org>
Reviewed-on: #12
Reviewed-by: muppeth <muppeth@no-reply@disroot.org>
2023-08-20 18:36:00 +00:00

40 lines
No EOL
979 B
YAML

---
#- name: '[Modules] - Install modules'
# npm:
# name: "{{ item.name }}"
# path: "{{ etherpad_app_dir }}/app"
# state: latest
# with_items: "{{ etherpad_plugins }}"
# become: yes
# become_user: "{{ etherpad_username }}"
# when: item.install|lower == 'true'
# notify:
# restart etherpad
# tags: modules
- name: '[Modules] - Install modules'
shell:
cmd: "npm install --no-save --legacy-peer-deps {{ item.name }}"
args:
chdir: "{{ etherpad_app_dir }}/app"
with_items: "{{ etherpad_plugins }}"
become: yes
become_user: "{{ etherpad_username }}"
when: item.install|lower == 'true'
notify:
restart etherpad
tags: modules
- name: '[Modules] - Uninstall modules'
npm:
name: "{{ item.name }}"
path: "{{ etherpad_app_dir }}/app"
state: absent
with_items: "{{ etherpad_plugins }}"
become: yes
become_user: "{{ etherpad_username }}"
when: item.install|lower == 'false'
notify:
restart etherpad
tags: modules