--- - name: '[Modules] - Install modules' npm: name: "{{ item.name }}" path: "{{ etherpad_app_dir }}" state: latest with_items: "{{ etherpad_plugins }}" when: item.install|lower == 'true' notify: restart etherpad - name: '[Modules] - Uninstall modules' npm: name: "{{ item.name }}" path: "{{ etherpad_app_dir }}" state: absent with_items: "{{ etherpad_plugins }}" when: item.install|lower == 'false' notify: restart etherpad