From 24c363791ee15e4e96bedb2b4b4f2d84bda70007 Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 22 Oct 2023 20:48:17 +0200 Subject: [PATCH] nextcloud: move delegate_to to main.yml --- tasks/database.yml | 2 -- tasks/main.yml | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tasks/database.yml b/tasks/database.yml index c55c412..eac0aeb 100644 --- a/tasks/database.yml +++ b/tasks/database.yml @@ -5,7 +5,6 @@ state: present login_unix_socket: "{{ mysql_socket }}" login_user: root - delegate_to: "{{ database_host }}" - name: "Database | Richte Datenbank-Benutzer ein | {{ item.name }}" community.mysql.mysql_user: @@ -17,4 +16,3 @@ login_unix_socket: "{{ mysql_socket }}" login_user: root update_password: on_create - delegate_to: "{{ database_host }}" diff --git a/tasks/main.yml b/tasks/main.yml index 4a3810b..667c92d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,8 +20,12 @@ - name: Run database tasks ansible.builtin.include_tasks: database.yml - tags: database + tags: always loop: "{{ nextcloud_instances }}" + args: + apply: + delegate_to: "{{ database_host }}" + tags: database - name: Run user tasks ansible.builtin.include_tasks: user.yml