Browse Source

add goland

pull/22/head
fedy95 4 years ago
parent
commit
15c502367c
  1. 3
      ansible-desktop.yml
  2. 22
      roles/common/tasks/main.yml
  3. 42
      roles/ide_goland/tasks/main.yml
  4. 4
      roles/ide_goland/vars/main.yml
  5. 42
      roles/ide_phpstorm/tasks/main.yml
  6. 4
      roles/ide_phpstorm/vars/main.yml
  7. 61
      roles/phpstorm/tasks/main.yml
  8. 4
      roles/phpstorm/vars/main.yml

3
ansible-desktop.yml

@ -6,7 +6,8 @@
- { role: common, become: true } - { role: common, become: true }
- { role: docker, become: true } - { role: docker, become: true }
- { role: firefox, become: true } - { role: firefox, become: true }
- { role: ide_goland, become: true }
- { role: ide_phpstorm, become: true }
- { role: krdc, become: true } - { role: krdc, become: true }
# - { role: materia-kde, become: true } # https://github.com/PapirusDevelopmentTeam/materia-kde # - { role: materia-kde, become: true } # https://github.com/PapirusDevelopmentTeam/materia-kde
- { role: phpstorm, become: true }
- { role: telegram, become: true } - { role: telegram, become: true }

22
roles/common/tasks/main.yml

@ -26,3 +26,25 @@
- name: Upgrade installed packages - name: Upgrade installed packages
apt: upgrade=yes apt: upgrade=yes
- name: Create .gitignore_global
copy:
dest: /home/fedy95/.gitignore_global
content: |
.idea
- name: Create global .gitconfig
copy:
dest: /home/fedy95/.gitconfig
content: |
[user]
name = fedy95
email = fedy95@protonmail.com
[core]
autocrlf = input
excludesfile = /home/fedy95/.gitignore_global
- name: Create Work dir
file:
path: /home/fedy95/Work
state: directory

42
roles/ide_goland/tasks/main.yml

@ -0,0 +1,42 @@
---
- name: Test if folder exist
stat:
path: "{{ goland_bin }}"
register: goland_exist
- name: Download
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
- name: Create folder
file:
path: /opt/ide_goland-{{ goland_version }}
state: directory
when: goland_exist.stat.exists == False
- name: Decompress
unarchive:
src: /opt/ide_goland-{{ goland_version }}.tar.gz
dest: /opt/ide_goland-{{ goland_version }}
extra_opts: [ --strip-component=1 ]
when: goland_exist.stat.exists == False
- name: Create symlink
file:
src: /opt/ide_goland-{{ goland_version }}/bin/ide_goland.sh
dest: "{{ goland_bin }}"
state: link
when: goland_exist.stat.exists == False
- name: Remove archive
file:
path: /opt/ide_goland-{{ goland_version }}.tar.gz
state: absent
when: goland_exist.stat.exists == False
- name: Init start (Create Desktop Entry)
command: sh {{ goland_bin }}
when: goland_exist.stat.exists == False

4
roles/ide_goland/vars/main.yml

@ -0,0 +1,4 @@
---
goland_bin: "/usr/local/bin/ide_goland"
goland_version: "2020.3.3"

42
roles/ide_phpstorm/tasks/main.yml

@ -0,0 +1,42 @@
---
- name: Test if folder exist
stat:
path: "{{ phpstorm_bin }}"
register: phpstorm_exist
- name: Download
get_url:
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
- name: Create folder
file:
path: /opt/ide_phpstorm-{{ phpstorm_version }}
state: directory
when: phpstorm_exist.stat.exists == False
- name: Decompress
unarchive:
src: /opt/ide_phpstorm-{{ phpstorm_version }}.tar.gz
dest: /opt/ide_phpstorm-{{ phpstorm_version }}
extra_opts: [ --strip-component=1 ]
when: phpstorm_version.stat.exists == False
- name: Create symlink
file:
src: /opt/ide_phpstorm-{{ phpstorm_version }}/bin/ide_phpstorm.sh
dest: "{{ phpstorm_bin }}"
state: link
when: phpstorm_exist.stat.exists == False
- name: Remove archive
file:
path: /opt/ide_phpstorm-{{ phpstorm_version }}.tar.gz
state: absent
when: phpstorm_exist.stat.exists == False
- name: Init start (Create Desktop Entry)
command: sh {{ phpstorm_bin }}
when: phpstorm_exist.stat.exists == False

4
roles/ide_phpstorm/vars/main.yml

@ -0,0 +1,4 @@
---
phpstorm_bin: "/usr/local/bin/ide_phpstorm"
phpstorm_version: "2020.3.2"

61
roles/phpstorm/tasks/main.yml

@ -1,61 +0,0 @@
---
- name: Test if folder exist
stat:
path: "{{ phpstorm_bin }}"
register: phpstorm_exist
- name: Download
get_url:
url: http://download.jetbrains.com/webide/PhpStorm-{{ phpstorm_version }}.tar.gz
dest: /opt/phpstorm-{{ phpstorm_version }}.tar.gz
when: phpstorm_exist.stat.exists == False
- name: Decompress
unarchive:
src: /opt/phpstorm-{{ phpstorm_version }}.tar.gz
dest: /opt
copy: no
when: phpstorm_exist.stat.exists == False
- name: Create folder
shell:
mv /opt/PhpStorm-* /opt/phpstorm-{{ phpstorm_version }}
creates="/opt/phpstorm-{{ phpstorm_version }}"
when: phpstorm_exist.stat.exists == False
- name: Create symlink
file:
src: /opt/phpstorm-{{ phpstorm_version }}/bin/phpstorm.sh
dest: "{{ phpstorm_bin }}"
state: link
when: phpstorm_exist.stat.exists == False
- name: Remove archive
file:
path: /opt/phpstorm-{{ phpstorm_version }}.tar.gz
state: absent
when: phpstorm_exist.stat.exists == False
- name: Create .gitignore_global
copy:
dest: /home/fedy95/.gitignore_global
content: |
.idea
when: phpstorm_exist.stat.exists == False
- name: Create .gitconfig
copy:
dest: /home/fedy95/.gitconfig
content: |
[user]
name = fedy95
email = fedy95@protonmail.com
[core]
autocrlf = input
excludesfile = /home/fedy95/.gitignore_global
when: phpstorm_exist.stat.exists == False
- name: Init start (Create Desktop Entry)
command: sh {{ phpstorm_bin }}
when: phpstorm_exist.stat.exists == False

4
roles/phpstorm/vars/main.yml

@ -1,4 +0,0 @@
---
phpstorm_bin: "/usr/local/bin/phpstorm"
phpstorm_version: "2020.3.1"