etherpad/tasks/modules.yml

40 lines
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