mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
nextcloud(role): remove async → use batched shell; more robust changed_when/failed_when; fix quoting; refactor plugin routines; clean up vars
• 02_add_missing_indices.yml: switched to shell (+ansible_command_timeout), removed async/poll. • 04_system_config.yml: batch OCC calls (set -euo pipefail, /bin/bash), safer quoting, change detection via ' set to '. • 05_plugin.yml: disable task with stricter failed_when/changed_when (combine stdout+stderr). • 06_plugin_routines.yml: disable incompatible plugins in a single batch; no async_status; robust changed_when. • 07_plugin_enable_and_configure.yml: batch config:app:set, safe quoting, clear changed_when/failed_when. • config/main.yml & vars/main.yml: removed performance.async.wait_for and nextcloud_wait_for_async_enabled.
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
when: plugin_value.enabled | bool
|
||||
|
||||
- name: disable {{ plugin_key }} nextcloud plugin
|
||||
command: "{{nextcloud_docker_exec_occ}} app:disable {{ plugin_key }}"
|
||||
command: "{{ nextcloud_docker_exec_occ }} app:disable {{ plugin_key }}"
|
||||
register: disable_result
|
||||
changed_when: disable_result.rc == 0 and ("No such app enabled" not in disable_result.stdout)
|
||||
when: not (plugin_value.enabled | bool)
|
||||
failed_when: >
|
||||
(disable_result.rc | int != 0)
|
||||
and ('No such app enabled' not in (disable_result.stdout | default('') ~ disable_result.stderr | default('')))
|
||||
changed_when: >
|
||||
((disable_result.stdout | default('') ~ disable_result.stderr | default('')) is search('disabled'))
|
||||
and (((disable_result.stdout | default('') ~ disable_result.stderr | default('')) is not search('already disabled')))
|
||||
when: not (plugin_value.enabled | bool)
|
||||
|
Reference in New Issue
Block a user