From 111c4b68fad46576e9fa1a8e4d7f28d34871bcb4 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Thu, 23 Jul 2020 01:51:25 +0200 Subject: [PATCH] Update jetbrains toolbox to not require static version number --- roles/jetbrains/tasks/jetbrains-toolbox.yml | 31 +++++++++++++++++++-- roles/jetbrains/vars/main.yml | 3 -- 2 files changed, 28 insertions(+), 6 deletions(-) delete mode 100644 roles/jetbrains/vars/main.yml diff --git a/roles/jetbrains/tasks/jetbrains-toolbox.yml b/roles/jetbrains/tasks/jetbrains-toolbox.yml index 2925b97..42c5c1c 100644 --- a/roles/jetbrains/tasks/jetbrains-toolbox.yml +++ b/roles/jetbrains/tasks/jetbrains-toolbox.yml @@ -1,8 +1,33 @@ --- -- name: Unarchive a file that needs to be downloaded (added in 2.0) +- name: Create temp dir + file: + path: /tmp/jetbrains-toolbox + state: directory + +- name: Install jetbrains toolbox become: yes unarchive: - src: https://download.jetbrains.com/toolbox/jetbrains-toolbox-{{ toolbox.version }}.tar.gz - dest: /usr/local/bin + src: https://data.services.jetbrains.com/products/download?platform=linux&code=TBA + dest: /tmp/jetbrains-toolbox remote_src: yes mode: 0755 + +- name: get folder name + shell: ls /tmp/jetbrains-toolbox + register: dir_name + +- name: Move foo to bar + become: yes + command: cp -ra /tmp/jetbrains-toolbox/{{ dir_name.stdout }}/jetbrains-toolbox /usr/local/bin/jetbrains-toolbox + +- name: Remove temp directory + become: yes + file: + path: /tmp/jetbrains-toolbox + state: absent + +- name: change chmod + become: yes + file: + path: /usr/local/bin/jetbrains-toolbox + mode: '0755' \ No newline at end of file diff --git a/roles/jetbrains/vars/main.yml b/roles/jetbrains/vars/main.yml deleted file mode 100644 index 5514a8d..0000000 --- a/roles/jetbrains/vars/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -toolbox: - version: 1.17.7275