Skip to content

Commit b73f187

Browse files
committed
fix: unpack archive only if needed
1 parent 99c14a7 commit b73f187

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

roles/keycloak/tasks/install.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,12 @@
121121
register: new_version_downloaded
122122
become: yes
123123

124-
- name: "Check work directory: {{ keycloak_dest }}"
124+
- name: "Check target directory: {{ keycloak.home }}"
125125
stat:
126-
path: "{{ keycloak_dest }}"
126+
path: "{{ keycloak.home }}"
127127
register: path_to_workdir
128128
become: yes
129129

130-
- name: "Create work directory {{ keycloak_dest }}"
131-
file:
132-
path: "{{ keycloak_dest }}"
133-
state: directory
134-
owner: "{{ keycloak_service_user }}"
135-
group: "{{ keycloak_service_group }}"
136-
mode: 0750
137-
become: yes
138-
when: not path_to_workdir.stat.exists
139-
140130
- name: "Extract {{ 'Red Hat Single Sign-On' if keycloak_rhsso_enable else 'Keycloak' }} archive on target"
141131
unarchive:
142132
remote_src: yes

0 commit comments

Comments
 (0)