add-jetbrains-mono-typeface
#24
Merged
fedy95
merged 2 commits from add-jetbrains-mono-typeface
into master
4 years ago
6 changed files with 63 additions and 37 deletions
-
1ansible-desktop.yml
-
40roles/ide_goland/tasks/main.yml
-
2roles/ide_goland/vars/main.yml
-
38roles/ide_phpstorm/tasks/main.yml
-
2roles/ide_phpstorm/vars/main.yml
-
17roles/typeface/tasks/main.yml
@ -1,42 +1,46 @@ |
|||||
--- |
--- |
||||
|
|
||||
- name: Test if folder exist |
|
||||
|
- name: Check opt artifacts exist |
||||
stat: |
stat: |
||||
path: "{{ goland_bin }}" |
|
||||
register: goland_exist |
|
||||
|
path: "/opt/goland-{{ goland_version }}" |
||||
|
register: goland_artifacts |
||||
|
|
||||
- name: Download |
- name: Download |
||||
get_url: |
get_url: |
||||
url: http://download.jetbrains.com/go/ide_goland-{{ goland_version }}.tar.gz |
|
||||
dest: /opt/ide_goland-{{ goland_version }}.tar.gz |
|
||||
when: goland_exist.stat.exists == False |
|
||||
|
url: http://download.jetbrains.com/go/goland-{{ goland_version }}.tar.gz |
||||
|
dest: /opt/goland-{{ goland_version }}.tar.gz |
||||
|
when: goland_artifacts.stat.exists == False |
||||
|
|
||||
- name: Create folder |
- name: Create folder |
||||
file: |
file: |
||||
path: /opt/ide_goland-{{ goland_version }} |
|
||||
|
path: /opt/goland-{{ goland_version }} |
||||
state: directory |
state: directory |
||||
when: goland_exist.stat.exists == False |
|
||||
|
when: goland_artifacts.stat.exists == False |
||||
|
|
||||
- name: Decompress |
- name: Decompress |
||||
unarchive: |
unarchive: |
||||
src: /opt/ide_goland-{{ goland_version }}.tar.gz |
|
||||
dest: /opt/ide_goland-{{ goland_version }} |
|
||||
|
src: /opt/goland-{{ goland_version }}.tar.gz |
||||
|
dest: /opt/goland-{{ goland_version }} |
||||
extra_opts: [ --strip-component=1 ] |
extra_opts: [ --strip-component=1 ] |
||||
when: goland_exist.stat.exists == False |
|
||||
|
when: goland_artifacts.stat.exists == False |
||||
|
|
||||
- name: Create symlink |
- name: Create symlink |
||||
file: |
file: |
||||
src: /opt/ide_goland-{{ goland_version }}/bin/ide_goland.sh |
|
||||
|
src: /opt/goland-{{ goland_version }}/bin/goland.sh |
||||
dest: "{{ goland_bin }}" |
dest: "{{ goland_bin }}" |
||||
state: link |
state: link |
||||
when: goland_exist.stat.exists == False |
|
||||
|
when: goland_bin.stat.exists == False |
||||
|
|
||||
|
|
||||
|
- name: Check binary exist |
||||
|
stat: |
||||
|
path: "{{ goland_bin }}" |
||||
|
register: goland_bin |
||||
|
|
||||
- name: Remove archive |
- name: Remove archive |
||||
file: |
|
||||
path: /opt/ide_goland-{{ goland_version }}.tar.gz |
|
||||
state: absent |
|
||||
when: goland_exist.stat.exists == False |
|
||||
|
shell: rm -r /opt/goland-{{ goland_version }}.tar.gz |
||||
|
when: goland_version.stat.exists == False |
||||
|
|
||||
- name: Init start (Create Desktop Entry) |
- name: Init start (Create Desktop Entry) |
||||
command: sh {{ goland_bin }} |
command: sh {{ goland_bin }} |
||||
when: goland_exist.stat.exists == False |
|
||||
|
when: goland_bin.stat.exists == False |
@ -1,4 +1,4 @@ |
|||||
--- |
--- |
||||
|
|
||||
goland_bin: "/usr/local/bin/ide_goland" |
|
||||
|
goland_bin: "/usr/local/bin/goland" |
||||
goland_version: "2020.3.3" |
goland_version: "2020.3.3" |
@ -1,42 +1,46 @@ |
|||||
--- |
--- |
||||
|
|
||||
- name: Test if folder exist |
|
||||
|
- name: Check opt artifacts exist |
||||
stat: |
stat: |
||||
path: "{{ phpstorm_bin }}" |
|
||||
register: phpstorm_exist |
|
||||
|
path: "/opt/phpstorm-{{ phpstorm_version }}" |
||||
|
register: phpstorm_artifacts |
||||
|
|
||||
- name: Download |
- name: Download |
||||
get_url: |
get_url: |
||||
url: http://download.jetbrains.com/webide/PhpStorm-{{ phpstorm_version }}.tar.gz |
url: http://download.jetbrains.com/webide/PhpStorm-{{ phpstorm_version }}.tar.gz |
||||
dest: /opt/ide_phpstorm-{{ phpstorm_version }}.tar.gz |
|
||||
when: phpstorm_exist.stat.exists == False |
|
||||
|
dest: /opt/phpstorm-{{ phpstorm_version }}.tar.gz |
||||
|
when: phpstorm_artifacts.stat.exists == False |
||||
|
|
||||
- name: Create folder |
- name: Create folder |
||||
file: |
file: |
||||
path: /opt/ide_phpstorm-{{ phpstorm_version }} |
|
||||
|
path: /opt/phpstorm-{{ phpstorm_version }} |
||||
state: directory |
state: directory |
||||
when: phpstorm_exist.stat.exists == False |
|
||||
|
when: phpstorm_artifacts.stat.exists == False |
||||
|
|
||||
- name: Decompress |
- name: Decompress |
||||
unarchive: |
unarchive: |
||||
src: /opt/ide_phpstorm-{{ phpstorm_version }}.tar.gz |
|
||||
dest: /opt/ide_phpstorm-{{ phpstorm_version }} |
|
||||
|
src: /opt/phpstorm-{{ phpstorm_version }}.tar.gz |
||||
|
dest: /opt/phpstorm-{{ phpstorm_version }} |
||||
extra_opts: [ --strip-component=1 ] |
extra_opts: [ --strip-component=1 ] |
||||
when: phpstorm_version.stat.exists == False |
|
||||
|
when: phpstorm_artifacts.stat.exists == False |
||||
|
|
||||
- name: Create symlink |
- name: Create symlink |
||||
file: |
file: |
||||
src: /opt/ide_phpstorm-{{ phpstorm_version }}/bin/ide_phpstorm.sh |
|
||||
|
src: /opt/phpstorm-{{ phpstorm_version }}/bin/phpstorm.sh |
||||
dest: "{{ phpstorm_bin }}" |
dest: "{{ phpstorm_bin }}" |
||||
state: link |
state: link |
||||
when: phpstorm_exist.stat.exists == False |
|
||||
|
when: phpstorm_artifacts.stat.exists == False |
||||
|
|
||||
|
|
||||
|
- name: Test if folder exist |
||||
|
stat: |
||||
|
path: "{{ phpstorm_bin }}" |
||||
|
register: phpstorm_bin |
||||
|
|
||||
- name: Remove archive |
- name: Remove archive |
||||
file: |
|
||||
path: /opt/ide_phpstorm-{{ phpstorm_version }}.tar.gz |
|
||||
state: absent |
|
||||
when: phpstorm_exist.stat.exists == False |
|
||||
|
shell: rm -r /opt/phpstorm-{{ phpstorm_version }}.tar.gz |
||||
|
when: phpstorm_bin.stat.exists == False |
||||
|
|
||||
- name: Init start (Create Desktop Entry) |
- name: Init start (Create Desktop Entry) |
||||
command: sh {{ phpstorm_bin }} |
command: sh {{ phpstorm_bin }} |
||||
when: phpstorm_exist.stat.exists == False |
|
||||
|
when: phpstorm_bin.stat.exists == False |
@ -1,4 +1,4 @@ |
|||||
--- |
--- |
||||
|
|
||||
phpstorm_bin: "/usr/local/bin/ide_phpstorm" |
|
||||
|
phpstorm_bin: "/usr/local/bin/phpstorm" |
||||
phpstorm_version: "2020.3.2" |
phpstorm_version: "2020.3.2" |
@ -0,0 +1,17 @@ |
|||||
|
--- |
||||
|
|
||||
|
- name: Download typeface |
||||
|
get_url: |
||||
|
url: https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/install_manual.sh |
||||
|
dest: /opt/install_manual.sh |
||||
|
|
||||
|
- name: Set execution mod |
||||
|
shell: chmod +x /opt/install_manual.sh |
||||
|
|
||||
|
- name: Install typeface |
||||
|
shell: /bin/bash -c /opt/install_manual.sh |
||||
|
become: yes |
||||
|
become_user: fedy95 |
||||
|
|
||||
|
- name: Remove script typeface |
||||
|
shell: rm -r /opt/install_manual.sh |
Reference in new issue