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