From b73f187930f7afa66fe43cf592a0132f4b2ff297 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Fri, 28 Jan 2022 15:18:49 +0100 Subject: [PATCH] fix: unpack archive only if needed --- roles/keycloak/tasks/install.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/roles/keycloak/tasks/install.yml b/roles/keycloak/tasks/install.yml index 4194db7..af7e022 100644 --- a/roles/keycloak/tasks/install.yml +++ b/roles/keycloak/tasks/install.yml @@ -121,22 +121,12 @@ register: new_version_downloaded become: yes -- name: "Check work directory: {{ keycloak_dest }}" +- name: "Check target directory: {{ keycloak.home }}" stat: - path: "{{ keycloak_dest }}" + path: "{{ keycloak.home }}" register: path_to_workdir become: yes -- name: "Create work directory {{ keycloak_dest }}" - file: - path: "{{ keycloak_dest }}" - state: directory - owner: "{{ keycloak_service_user }}" - group: "{{ keycloak_service_group }}" - mode: 0750 - become: yes - when: not path_to_workdir.stat.exists - - name: "Extract {{ 'Red Hat Single Sign-On' if keycloak_rhsso_enable else 'Keycloak' }} archive on target" unarchive: remote_src: yes