|
34 | 34 | register: pre_commit_folder_check
|
35 | 35 |
|
36 | 36 | - name: Install pre-commit
|
37 |
| - command: pipx install pre-commit |
| 37 | + command: "{{ ansible_env.HOME }}/.local/bin/pipx install pre-commit" |
38 | 38 | register: output
|
39 | 39 | when: pre_commit_folder_check is failed
|
40 | 40 |
|
|
44 | 44 | register: cookiecutter_folder_check
|
45 | 45 |
|
46 | 46 | - name: Install cookiecutter
|
47 |
| - command: pipx install cookiecutter |
| 47 | + command: "{{ ansible_env.HOME }}/.local/bin/pipx install cookiecutter" |
48 | 48 | register: output
|
49 | 49 | when: cookiecutter_folder_check is failed
|
50 | 50 |
|
|
68 | 68 | when: poetry_cmd is failed
|
69 | 69 |
|
70 | 70 | - name: Check if nox is installed
|
71 |
| - stat: |
72 |
| - path: "{{ ansible_env.HOME }}/.local/bin/nox" |
73 |
| - register: nox_folder_check |
| 71 | + command: "{{ ansible_env.HOME }}/.local/bin/nox --version" |
| 72 | + register: nox_version_cmd |
| 73 | + changed_when: false |
| 74 | + ignore_errors: true |
74 | 75 |
|
75 | 76 | - name: Install nox
|
76 |
| - command: pipx install nox |
77 |
| - when: nox_folder_check is failed |
| 77 | + command: "{{ ansible_env.HOME }}/.local/bin/pipx install nox" |
| 78 | + when: nox_version_cmd is failed |
78 | 79 |
|
79 | 80 | - name: Install nox-poetry
|
80 |
| - command: pipx inject nox nox-poetry |
81 |
| - when: nox_folder_check is failed |
| 81 | + command: "{{ ansible_env.HOME }}/.local/bin/pipx inject nox nox-poetry" |
| 82 | + when: nox_version_cmd is failed |
82 | 83 |
|
83 | 84 | - name: Install pycharm
|
84 | 85 | include_tasks: pycharm.yml
|
|
0 commit comments