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

Commit be03e87

Browse files
authored
Merge pull request #252 from staticdev/feature/install-tox
Add tox install
2 parents 22bbef8 + 4f9772e commit be03e87

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Installs:
1616
- [Poetry]
1717
- [pre-commit]
1818
- [pyenv]
19+
- [Tox]
1920

2021
Note: for a playbook that installs IDEs, try [Linux workstation playbook].
2122

@@ -54,10 +55,10 @@ Here are some common usages of this role.
5455
- role: staticdev.python-developer
5556
vars:
5657
pyenv_global:
57-
- "3.11.0"
58+
- "3.11.4"
5859
pyenv_python_versions:
59-
- "3.11.0"
60-
- "3.10.6"
60+
- "3.11.4"
61+
- "3.10.12"
6162
```
6263
6364
## License
@@ -80,3 +81,4 @@ _Ansible role Python developer_ is free and open source software.
8081
[pyenv]: https://github.com/pyenv/pyenv
8182
[staticdev]: https://github.com/staticdev
8283
[staticdev.pyenv]: https://galaxy.ansible.com/staticdev/pyenv
84+
[tox]: https://tox.wiki/en/latest/

tasks/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,15 @@
8989
register: output
9090
changed_when: "output.rc == 0"
9191
when: nox_version_cmd is failed
92+
93+
- name: Check if tox is installed
94+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/tox --version"
95+
register: tox_version_cmd
96+
changed_when: false
97+
ignore_errors: true
98+
99+
- name: Install tox
100+
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pipx install tox"
101+
register: output
102+
changed_when: "output.rc == 0"
103+
when: tox_version_cmd is failed

0 commit comments

Comments
 (0)