main.yml 836 Bytes
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1 2 3
---
- name: download PyCharm
  get_url:
4
    url: "https://download-cf.jetbrains.com/python/{{ pycharm_name }}.tar.gz"
julian.gethmann's avatar
julian.gethmann committed
5 6 7 8 9
    dest: /tmp/pycharm.tar.gz

- name: create directory
  become: yes
  file:
10
    path: /usr/local/pycharm
julian.gethmann's avatar
julian.gethmann committed
11 12 13 14 15 16
    state: directory

- name: unarchive
  become: yes
  unarchive:
    src: /tmp/pycharm.tar.gz
17
    dest: /usr/local/pycharm
julian.gethmann's avatar
julian.gethmann committed
18
    remote_src: yes
19
    creates: "/usr/local/pycharm/{{ pycharm_name | regex_replace('-professional') }}"
20 21 22 23 24 25

- name: link PyCharm
  become: yes
  file:
    mode: o+rx
    path: /usr/local/bin/pycharm
26
    src: "/usr/local/pycharm/{{ pycharm_name | regex_replace('-professional') }}/bin/pycharm.sh"
27
    state: link
julian.gethmann's avatar
julian.gethmann committed
28 29 30 31 32 33 34

- name: Add Desktop-icon
  template:
    src: PyCharm.desktop.j2
    dest: "/home/{{ user_account }}/Desktop/PyCharm.desktop"
    backup: yes
    owner: "{{ user_account }}"