Skip to content

Commit

Permalink
Merge pull request #2 from func0der/1-optimize_version_check
Browse files Browse the repository at this point in the history
  • Loading branch information
x86-39 authored Dec 21, 2023
2 parents b95d12f + 050a0d8 commit 84aea12
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion roles/common/tasks/setup/always.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@
register: jetbrains_common_temporary_directory
changed_when: "jetbrains_common_temporary_directory is changed and 'molecule-idempotence-notest' not in ansible_skip_tags"

- name: Extract downloaded file
- name: Extract only product-info.json from downloaded file
become: true
ansible.builtin.unarchive:
src: /tmp/{{ jetbrains_common_name }}{{ jetbrains_common_edition }}-{{ jetbrains_common_version }}.tar.gz
dest: /tmp/{{ jetbrains_common_name }}{{ jetbrains_common_edition }}-{{ jetbrains_common_version }}
remote_src: true
extra_opts:
- --strip-components=1
- --no-anchored
- product-info.json
register: jetbrains_extract_temporary_directory
changed_when: "jetbrains_extract_temporary_directory is changed and 'molecule-idempotence-notest' not in ansible_skip_tags"

Expand All @@ -66,6 +68,15 @@
path: "/opt/{{ jetbrains_common_name }}"
state: absent

- name: Extract downloaded file
become: true
ansible.builtin.unarchive:
src: /tmp/{{ jetbrains_common_name }}{{ jetbrains_common_edition }}-{{ jetbrains_common_version }}.tar.gz
dest: /tmp/{{ jetbrains_common_name }}{{ jetbrains_common_edition }}-{{ jetbrains_common_version }}
remote_src: true
extra_opts:
- --strip-components=1

- name: Copy temporary directory to permanent location
become: true
ansible.builtin.copy:
Expand Down

0 comments on commit 84aea12

Please sign in to comment.