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 bec446a commit d647a07
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions roles/infinispan/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,12 @@
register: new_version_downloaded
become: yes

- name: "Check work directory: {{ jdg_app_download_dir }}"
- name: "Check target directory: {{ jdg.installation_path }}"
stat:
path: "{{ jdg_app_download_dir }}"
path: "{{ jdg.installation_path }}"
register: path_to_workdir
become: yes

- name: "Create work directory {{ jdg_app_download_dir }}"
file:
path: "{{ jdg_app_download_dir }}"
state: directory
owner: "{{ jdg.user.name }}"
group: "{{ jdg.group.name }}"
mode: 0750
become: yes
when: not path_to_workdir.stat.exists

- name: "Extract {{ 'Red Hat Datagrid' if jdg_enable else 'Infinispan' }} archive on target"
unarchive:
remote_src: yes
Expand Down

0 comments on commit d647a07

Please sign in to comment.