Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds git version param to pyenv and pyenv-virtualenv installation #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ pyenv_update: no
pyenv_python_configure_opts: ""
pyenv_uninstall_python_w_wrong_configure_opts: no

# aditional option to pin the pyenv and pyenv-virtualenv version
pyenv_git_ref: ""
pyenv_virtualenv_git_ref: ""

pyenv_debian_packages:
- build-essential
# On Ubuntu 12.04 build may fail with the following error:
Expand Down
16 changes: 16 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
---
- name: Install PyEnv from git ref
git:
repo: https://github.com/pyenv/pyenv.git
dest: "{{ pyenv_path }}"
version: "{{ pyenv_git_ref }}"
when: pyenv_git_ref

- name: Install PyEnv
git:
repo: https://github.com/pyenv/pyenv.git
dest: "{{ pyenv_path }}"
update: "{{ pyenv_update_git_install }}"
when: pyenv_git_ref is undefined

- name: Install PyEnv-virtualenv plugin from git ref
git:
repo: https://github.com/yyuu/pyenv-virtualenv.git
dest: "{{ pyenv_path }}/plugins/pyenv-virtualenv"
version: "{{ pyenv_virtualenv_git_ref }}"
when: pyenv_virtualenv_git_ref

- name: Install PyEnv-virtualenv plugin
git:
repo: https://github.com/yyuu/pyenv-virtualenv.git
dest: "{{ pyenv_path }}/plugins/pyenv-virtualenv"
update: "{{ pyenv_update_git_install }}"
when: pyenv_virtualenv_git_ref is undefined

- name: Install PyEnv-update plugin
git:
Expand Down