2021-03-14 17:53:38 +01:00
|
|
|
---
|
|
|
|
|
2023-09-02 07:55:02 +02:00
|
|
|
# The following command get the etherpad_plugins_list dictionnary
|
|
|
|
# selects only the enabled plugins
|
|
|
|
# then uses filter to get all plugins names in one line, without comas or quotes as needed for npm
|
2021-03-14 17:53:38 +01:00
|
|
|
- name: '[Modules] - Install modules'
|
2023-08-20 20:36:00 +02:00
|
|
|
shell:
|
2024-04-16 15:08:00 +02:00
|
|
|
cmd: "pnpm run install-plugins {{ etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'enabled') | map(attribute='key') |join(',') | replace(\",\", \" \") }}"
|
2023-08-20 20:36:00 +02:00
|
|
|
args:
|
|
|
|
chdir: "{{ etherpad_app_dir }}/app"
|
2022-06-20 02:27:16 +02:00
|
|
|
become: yes
|
|
|
|
become_user: "{{ etherpad_username }}"
|
2023-09-02 07:55:02 +02:00
|
|
|
when: etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'enabled') |length > 0
|
2021-03-14 17:53:38 +01:00
|
|
|
notify:
|
|
|
|
restart etherpad
|
2023-08-20 20:36:00 +02:00
|
|
|
tags: modules
|