Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ None.
Here is the list of all variables and their default values:

- `install_pycharm`: `false`
- `pycharm_flavor`: `pycharm-community`. You can use also `pycharm-professional` or `pycharm-educational`.
- `install_vscode`: `false`
- `vscode_extensions`: optional list of name_ids of extensions. eg.: ms-python.python (Python Official Extension)

Expand All @@ -47,6 +48,7 @@ Here is the list of all variables and their default values:
- role: staticdev.python-developer
vars:
install_pycharm: true
pycharm_flavor: pycharm-educational

# role with vscode and extensions
- hosts: all
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
install_pycharm: false
pycharm_flavor: pycharm-community
install_vscode: false
5 changes: 4 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---
# handlers file for staticdev.python-developer
- name: delete poetry installer
file:
path: "/home/{{ lookup('env', 'USER') }}/get-poetry.py"
state: absent
7 changes: 2 additions & 5 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ galaxy_info:
- precommit

dependencies:
- name: avanov.pyenv
version: 1.1.0
# - name: oefenweb.pycharm
# version: v5.0.7
# when: "{{ install_pycharm }}"
- name: staticdev.ansible_galaxy_pyenv
version: 1.1.1
# - name: gantsign.visual-studio-code
# version: 6.6.0
# when: "{{ install_vscode }}"
3 changes: 0 additions & 3 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
roles:
- name: staticdev.ansible_galaxy_pyenv
version: 1.1.1
- name: oefenweb.pycharm
version: v5.0.7
when: "{{ install_pycharm }}"
- name: gantsign.visual-studio-code
version: 6.6.0
when: "{{ install_vscode }}"
5 changes: 3 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Install pyenv
import_role:
name: avanov.pyenv
name: staticdev.ansible_galaxy_pyenv
vars:
pyenv_owner: "{{ lookup('env', 'USER') }}"
pyenv_path: "{{ lookup('env', 'HOME') }}/pyenv"
Expand Down Expand Up @@ -39,12 +39,13 @@
changed_when: false
ignore_errors: true

- name: Download poetry
- name: Download poetry installer
get_url:
url: https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
dest: "{{ lookup('env', 'HOME') }}"
mode: "0400"
when: poetry_version_cmd is failed
notify: delete poetry installer

- name: Install poetry
command: "python {{ lookup('env', 'HOME') }}/get-poetry.py"
Expand Down
5 changes: 3 additions & 2 deletions tasks/pycharm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- name: Install pycharm
include_role:
name: oefenweb.pycharm
community.general.snap:
name: "{{ pycharm_flavor }}"
classic: true
become: true