mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 08:30:46 +02:00
- Standardize async/poll usage with 'ASYNC_ENABLED | bool' - Add async/poll parameters to Cloudflare, Nginx, Mailu, MIG, Nextcloud, and OpenLDAP tasks - Update async configuration in 'group_vars/all/00_general.yml' to ensure boolean evaluation - Allow CAA, cache, and DNS tasks to run asynchronously when enabled https://chatgpt.com/share/689cd8cc-7fbc-800f-bd06-a667561573bf
23 lines
901 B
YAML
23 lines
901 B
YAML
- name: Load System Nextcloud configuration variables
|
|
include_vars:
|
|
file: system.yml
|
|
|
|
- name: "Apply Nextcloud system configs (batched shell)"
|
|
ansible.builtin.shell: |
|
|
set -euo pipefail
|
|
{% for item in nextcloud_system_config %}
|
|
{{ nextcloud_docker_exec_occ }} \
|
|
config:system:set {{ item.parameter }}{% if item.type is defined %} --type {{ item.type }}{% endif %} \
|
|
--value '{{ (item.value | string) | regex_replace("'", "'" ~ '"' ~ "'" ~ '"' ~ "'") }}'
|
|
{% endfor %}
|
|
args:
|
|
executable: /bin/bash
|
|
register: syscfg_shell
|
|
changed_when: >
|
|
not ASYNC_ENABLED and
|
|
( ((syscfg_shell.stdout | default('')) ~ (syscfg_shell.stderr | default('')))
|
|
is search(' set to ') )
|
|
failed_when: not ASYNC_ENABLED and syscfg_shell.rc != 0
|
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|