Skip to content

Commit

Permalink
fix: unpack archive only if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
guidograzioli committed Jan 28, 2022
1 parent 99c14a7 commit b73f187
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions roles/keycloak/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b73f187

Please sign in to comment.