mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 08:30:46 +02:00
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
- name: "Disable incompatible plugins for {{plugin_key}}."
|
|
command: "{{nextcloud_docker_exec_occ}} app:disable {{incompatible_plugin}}"
|
|
loop: "{{plugin_value.incompatible_plugins}}"
|
|
loop_control:
|
|
loop_var: incompatible_plugin
|
|
register: disable_incompatible_plugin_result
|
|
changed_when: disable_incompatible_plugin_result.rc == 0 and ("No such app enabled" not in disable_incompatible_plugin_result.stdout)
|
|
when:
|
|
- plugin_value.incompatible_plugins is defined
|
|
- plugin_value.incompatible_plugins | length > 0
|
|
|
|
- name: install {{ plugin_key }} nextcloud plugin
|
|
command: "{{ nextcloud_docker_exec_occ }} app:install {{ plugin_key }}"
|
|
register: install_result
|
|
failed_when: >
|
|
install_result.rc != 0
|
|
and
|
|
("already installed" not in install_result.stdout)
|
|
and
|
|
("not compatible with this version of the server" not in install_result.stdout)
|
|
changed_when: >
|
|
install_result.rc == 0
|
|
and
|
|
("already installed" not in install_result.stdout)
|
|
|
|
- include_tasks: 04_plugin_enable_and_configure.yml
|
|
when:
|
|
- install_result is defined
|
|
- >
|
|
install_result.rc == 0
|
|
or "already installed" in install_result.stdout |