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

Commit 761fd4a

Browse files
author
staticdev
committed
Conditional pyenv install
1 parent dd0f96b commit 761fd4a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

defaults/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
install_pycharm: false
33
pycharm_flavor: pycharm-community
44
install_vscode: false
5-
pyenv_python_versions: []

tasks/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
pyenv_global: "{{ pyenv_global }}"
1515
pyenv_python_versions: "{{ pyenv_python_versions }}"
1616
pyenv_virtualenvs: []
17+
when: pyenv_python_versions is defined
18+
19+
- name: Install pyenv
20+
import_role:
21+
name: staticdev.pyenv
22+
vars:
23+
pyenv_owner: "{{ ansible_env.USER }}"
24+
pyenv_path: "{{ ansible_env.HOME }}/pyenv"
25+
pyenv_virtualenvs: []
26+
when: pyenv_python_versions is undefined
1727

1828
- name: Check if pipx is installed
1929
command: "{{ ansible_env.HOME }}/.local/bin/pipx --version"

0 commit comments

Comments
 (0)