mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 08:30:46 +02:00
• Add config.performance.async.wait_for and expose as nextcloud_wait_for_async_enabled to toggle waiting for async jobs. • Split system/admin/index maintenance into separate tasks: 02_add_missing_indices.yml, 03_admin.yml, 04_system_config.yml. • Refactor plugin flow: rename 02_plugin→05_plugin, 03_plugin_routines→06_plugin_routines, 04_plugin_enable_and_configure→07_plugin_enable_and_configure; remove old 03_plugin_routines and 05_system. • Harden async handling: filter async_status loops by ansible_job_id; conditionally wait only when nextcloud_wait_for_async_enabled; reduce delay to 1s. • Reorder main.yml to run system steps before plugin setup; keep handlers flush earlier. • env.j2: simplify get_app_conf lookups (drop extra True flag). • vars/main.yml: add nextcloud_host_nginx_path and nextcloud_wait_for_async_enabled. https://chatgpt.com/share/689c9d4a-1748-800f-b490-06a5a48dd831
19 lines
673 B
YAML
19 lines
673 B
YAML
- name: "Launch async: add missing DB indices in Nextcloud"
|
|
ansible.builtin.command: >
|
|
{{ nextcloud_docker_exec_occ }} db:add-missing-indices
|
|
async: 3600
|
|
poll: 0
|
|
register: db_indices_job
|
|
|
|
- name: "Wait for DB indices job"
|
|
ansible.builtin.async_status:
|
|
jid: "{{ db_indices_job.ansible_job_id }}"
|
|
register: db_indices_result
|
|
until: db_indices_result.finished
|
|
retries: 600
|
|
delay: 1
|
|
failed_when: db_indices_result.rc != 0
|
|
changed_when: >
|
|
('Adding additional' in (db_indices_result.stdout | default(''))) or
|
|
('Removing' in (db_indices_result.stdout | default(''))) or
|
|
('updated successfully' in (db_indices_result.stdout | default(''))) |