Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

Commit 7b19687

Browse files
author
staticdev
committed
Lots of fixes
1 parent 06437de commit 7b19687

File tree

10 files changed

+61
-10
lines changed

10 files changed

+61
-10
lines changed

.ansible-lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
exclude_paths: ~/.ansible
2+
13
skip_list:
24
- '306'
35
- '106'

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ repos:
1818
hooks:
1919
- id: yamllint
2020
args: [-c=.yamllint]
21+
- repo: https://github.com/ansible-community/ansible-lint.git
22+
rev: v4.3.7
23+
hooks:
24+
- id: ansible-lint
25+
files: \.(yaml|yml)$

.yamllint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ rules:
88

99
ignore: |
1010
.github/stale.yml
11-
.travis.yml

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ None.
2121

2222
## Role Variables
2323

24-
None.
24+
Here is the list of all variables and their default values:
25+
26+
`install_pycharm`: `false`
27+
`install_vscode`: `false`
28+
`vscode_extensions`: optional list of name_ids of extensions. eg.: ms-python.python (Python Official Extension)
2529

2630
## Dependencies
2731

@@ -30,9 +34,26 @@ None.
3034
## Example Playbook
3135

3236
```yaml
37+
# role without IDE
38+
- hosts: all
39+
roles:
40+
- role: staticdev.python-developer
41+
42+
# role with pycharm
43+
- hosts: all
44+
roles:
45+
- role: staticdev.python-developer
46+
install_pycharm: true
47+
48+
# role with vscode and extensions
3349
- hosts: all
3450
roles:
3551
- role: staticdev.python-developer
52+
install_vscode: true
53+
vscode_extensions:
54+
- ms-python.python
55+
- ms-python.vscode-pylance
56+
- shan.code-settings-sync
3657
```
3758
3859
## License

defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
---
2-
# defaults file for staticdev.python-developer
2+
install_pycharm: false
3+
install_vscode: false

meta/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
galaxy_info:
23
author: staticdev
3-
description: This install packages for developing in Python on multiple versions using [Cookiecutter Hypermodern Python](https://github.com/cjolowicz/cookiecutter-hypermodern-python).
4+
description: This install packages for developing in Python on multiple versions using Cookiecutter Hypermodern Python.
45

56
license:
67
- MIT
@@ -35,7 +36,7 @@ galaxy_info:
3536
- poetry
3637
- pyenv
3738
- pipx
38-
- pre-commit
39+
- precommit
3940

4041
dependencies:
4142
- role: avanov.pyenv

requirements.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
---
22
roles:
33
- name: avanov.pyenv
4+
version: 1.1.0
5+
- name: oefenweb.pycharm
6+
version: v5.0.7
7+
when: install_pycharm
8+
- name: ngetchell.vscode
9+
version: v1.0.3
10+
when: install_vscode

tasks/main.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
become: true
2424

2525
- name: Check if cookiecutter is installed
26-
shell: cookiecutter --version
26+
command: cookiecutter --version
2727
register: cookiecutter_version_cmd
2828
changed_when: false
2929
ignore_errors: true
@@ -34,7 +34,7 @@
3434
when: cookiecutter_version_cmd is failed
3535

3636
- name: Check if poetry is installed
37-
shell: poetry --version
37+
command: poetry --version
3838
register: poetry_version_cmd
3939
changed_when: false
4040
ignore_errors: true
@@ -51,7 +51,7 @@
5151
when: poetry_version_cmd is failed
5252

5353
- name: Check if nox is installed
54-
shell: nox --version
54+
command: nox --version
5555
register: nox_version_cmd
5656
changed_when: false
5757
ignore_errors: true
@@ -60,5 +60,10 @@
6060
command: pipx install nox
6161
when: nox_version_cmd is failed
6262

63-
- name: Install nox-poetry
64-
command: pipx inject nox nox-poetry
63+
- name: Install pycharm
64+
include_tasks: pycharm.yml
65+
when: install_pycharm
66+
67+
- name: Install vscode
68+
include_tasks: vscode.yml
69+
when: install_vscode

tasks/pycharm.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
- name: Install pycharm
3+
include_role:
4+
name: oefenweb.pycharm

tasks/vscode.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: Install vscode
3+
include_role:
4+
name: ngetchell.vscode
5+
vars:
6+
vscode_extension: vscode_extensions

0 commit comments

Comments
 (0)