main.yml 772 Bytes
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
---
2
- name: create directory
julian.gethmann's avatar
julian.gethmann committed
3
4
  become: yes
  file:
5
    path: /usr/local/pycharm
julian.gethmann's avatar
julian.gethmann committed
6
7
    state: directory

8
- name: unarchive
julian.gethmann's avatar
julian.gethmann committed
9
10
  become: yes
  unarchive:
11
    src: "https://download-cf.jetbrains.com/python/{{ pycharm_name }}.tar.gz"
12
    dest: /usr/local/pycharm
julian.gethmann's avatar
julian.gethmann committed
13
    remote_src: yes
14
    creates: "/usr/local/pycharm/{{ pycharm_name | regex_replace('-professional') }}"
15

16
- name: link PyCharm
17
18
19
20
  become: yes
  file:
    mode: o+rx
    path: /usr/local/bin/pycharm
21
    src: "/usr/local/pycharm/{{ pycharm_name | regex_replace('-professional') }}/bin/pycharm.sh"
22
    state: link
julian.gethmann's avatar
julian.gethmann committed
23

24
- name: add Desktop-icon
julian.gethmann's avatar
julian.gethmann committed
25
26
27
28
29
  template:
    src: PyCharm.desktop.j2
    dest: "/home/{{ user_account }}/Desktop/PyCharm.desktop"
    backup: yes
    owner: "{{ user_account }}"
30
31
    group: users
    mode: 0744