Pycharm (https://www.jetbrains.com/pycharm)
This role installs Pycharm and configured plugins. It has been tested on Linux Mint 18 but should wokr on most distributions. By default it installs Pycharm community edition 2017.1.5 and no additional plugins
By default Pycharm is installed under the user's home directory and become is not needed.
None
pycharm_version: 2017.1.5
pycharm_edition: community
pycharm_download_mirror: https://download.jetbrains.com/python/
pycharm_plugin_download_mirror: "https://plugins.jetbrains.com/plugin/download?updateId="
pycharm_plugins: []
pycharm_download_directory: /tmp
pycharm_user_dir: "~{{ (pycharm_install_user is defined) | ternary(pycharm_install_user, ansible_user_id) }}"
pycharm_install_directory: "{{ pycharm_user_dir | expanduser }}/Tools"
pycharm_install_user: <undefined>
pycharm_install_file: "pycharm-{{ pycharm_edition}}-{{ pycharm_version }}.tar.gz"
pycharm_download_url: "{{ pycharm_download_mirror }}{{ pycharm_install_file }}"
pycharm_desktop_file_directory: "{{ ansible_env['HOME'] }}/.local/share/applications"
pycharm_desktop_file_location: "{{ pycharm_user_dir | expanduser }}/.local/share/applications/pycharm-{{ pycharm_edition }}-{{ pycharm_version }}.desktop"
- pycharm_plugins is a list of names which get appended to pycharm_plugin_download_mirror to form a full download
- Defining pycharm_install_user allows the role to install under a different user, however become is required
None
Example playbook
- hosts: localhost
connection: local
roles:
- henriklyngaard.pycharm
Exmaple inventory for plugins
The below IDs have been found by going to https://plugins.jetbrains.com/pycharm and searching for the plugin. Once found copy the link location for the desired version and use the updateId=XXXXX part at the end
pycharm_plugins:
# ignore 1.7.6
- 32828
# bash support 1.6.5.171
- 31610
# ansible 0.9.4
- 27616
# docker 2.5.3
- 33621
# markdown 2017.1.20170302
- 33092
Alternatively upload the required plugins to a webserver and adjust pycharm_plugin_download_mirror and pycharm_plugins accordingly
MIT
- 1.4: Allow installation under another user
- 1.3: Upgrade to Pycharm 2017.1.5
- 1.2: Added molecule tests
- 1.1: Create the desktop file directory in case we are the first
- 1.0: Initial version