From abc064fa567b5e4a09cce297d3369bab791c778b Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 14 Aug 2025 00:07:09 +0200 Subject: [PATCH] Added async for openproject settings --- roles/web-app-openproject/tasks/01_ldap.yml | 24 ++++++--------------- roles/web-app-openproject/tasks/main.yml | 2 ++ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/roles/web-app-openproject/tasks/01_ldap.yml b/roles/web-app-openproject/tasks/01_ldap.yml index db504523..cd592307 100644 --- a/roles/web-app-openproject/tasks/01_ldap.yml +++ b/roles/web-app-openproject/tasks/01_ldap.yml @@ -39,6 +39,8 @@ tls_certificate_string = '{{ openproject_ldap.tls_certificate_string }}' WHERE name = '{{ openproject_ldap.name }}'; when: ldap_check.query_result | length > 0 + async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}" + poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" - name: Create new LDAP auth source community.postgresql.postgresql_query: @@ -73,22 +75,8 @@ '{{ openproject_ldap.tls_certificate_string }}' ); when: ldap_check.query_result | length == 0 - -- name: Show all LDAP sources (debug) - community.postgresql.postgresql_query: - db: "{{ database_name }}" - login_user: "{{ database_username }}" - login_password: "{{ database_password }}" - login_host: "127.0.0.1" - login_port: "{{ database_port }}" - query: "SELECT id, name FROM ldap_auth_sources" - register: ldap_entries - when: MODE_DEBUG | bool - -- name: Debug LDAP entries - debug: - var: ldap_entries - when: MODE_DEBUG | bool + async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}" + poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" # This works just after the first admin login # @todo Remove and replace trough LDAP RBAC group @@ -108,4 +96,6 @@ \" " args: - chdir: "{{ docker_compose.directories.instance }}" \ No newline at end of file + chdir: "{{ docker_compose.directories.instance }}" + async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}" + poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" \ No newline at end of file diff --git a/roles/web-app-openproject/tasks/main.yml b/roles/web-app-openproject/tasks/main.yml index 02c2f364..2523c2ac 100644 --- a/roles/web-app-openproject/tasks/main.yml +++ b/roles/web-app-openproject/tasks/main.yml @@ -33,6 +33,8 @@ args: chdir: "{{ docker_compose.directories.instance }}" loop: "{{ openproject_rails_settings | dict2items }}" + async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}" + poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" - name: Setup LDAP include_tasks: 01_ldap.yml