mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 16:40:45 +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
14 lines
690 B
YAML
14 lines
690 B
YAML
- name: Ensure Nextcloud administrator is in the 'admin' group
|
|
command: >
|
|
docker exec -u {{ nextcloud_docker_user }} {{ nextcloud_container }}
|
|
php occ group:adduser admin {{ nextcloud_administrator_username }}
|
|
register: add_admin_to_group
|
|
changed_when: "not ASYNC_ENABLED and 'Added user' in (add_admin_to_group.stdout | default(''))"
|
|
failed_when: >
|
|
not ASYNC_ENABLED and
|
|
(add_admin_to_group.rc != 0) and
|
|
("is already a member of" not in (
|
|
(add_admin_to_group.stderr | default('')) ~ (add_admin_to_group.stdout | default(''))
|
|
))
|
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" |