You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
---
|
|
- name: Check opt artifacts exist
|
|
stat:
|
|
path: "/opt/goland-{{ goland_version }}"
|
|
register: goland_artifacts_flag
|
|
|
|
- name: Download
|
|
get_url:
|
|
url: http://download.jetbrains.com/go/goland-{{ goland_version }}.tar.gz
|
|
dest: /opt/goland-{{ goland_version }}.tar.gz
|
|
when: goland_artifacts_flag.stat.exists == False
|
|
|
|
- name: Create folder
|
|
file:
|
|
path: /opt/goland-{{ goland_version }}
|
|
state: directory
|
|
when: goland_artifacts_flag.stat.exists == False
|
|
|
|
- name: Decompress
|
|
unarchive:
|
|
src: /opt/goland-{{ goland_version }}.tar.gz
|
|
dest: /opt/goland-{{ goland_version }}
|
|
extra_opts: [ --strip-component=1 ]
|
|
when: goland_artifacts_flag.stat.exists == False
|
|
|
|
|
|
- name: Check binary exist
|
|
stat:
|
|
path: "{{ goland_bin }}"
|
|
register: goland_bin_flag
|
|
|
|
- name: Create symlink
|
|
file:
|
|
src: /opt/goland-{{ goland_version }}/bin/goland.sh
|
|
dest: "{{ goland_bin }}"
|
|
state: link
|
|
when: goland_bin_flag.stat.exists == False
|
|
|
|
- name: Remove archive
|
|
shell: rm -r /opt/goland-{{ goland_version }}.tar.gz
|
|
when: goland_bin_flag.stat.exists == False
|
|
|
|
- name: Init start (Create Desktop Entry)
|
|
command: sh {{ goland_bin }}
|
|
when: goland_bin_flag.stat.exists == False
|
|
...
|