--- - 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