33 lines
857 B
YAML
33 lines
857 B
YAML
---
|
|
- name: pyenv | Clone pyenv repository
|
|
git:
|
|
depth: 1
|
|
repo: https://github.com/pyenv/pyenv.git
|
|
dest: '{{ ansible_env.PYENV_ROOT }}'
|
|
|
|
- name: pyenv | Clone pyenv plugins
|
|
git:
|
|
depth: 1
|
|
repo: 'https://github.com/pyenv/{{ item }}.git'
|
|
dest: '{{ ansible_env.PYENV_ROOT }}/plugins/{{ item }}'
|
|
loop:
|
|
- pyenv-update
|
|
- pyenv-virtualenv
|
|
|
|
- name: pyenv | Symlink pyenv executable
|
|
file:
|
|
src: '{{ ansible_env.PYENV_ROOT }}/libexec/pyenv'
|
|
dest: ~/.local/bin/pyenv
|
|
state: link
|
|
|
|
- name: pyenv | Add fish startup hooks
|
|
tags: fish
|
|
blockinfile:
|
|
path: ~/.config/fish/config.fish
|
|
block: |
|
|
# pyenv startup hooks
|
|
status is-login; and pyenv init --path | source
|
|
status is-interactive; and pyenv init - | source
|
|
status is-interactive; and pyenv virtualenv-init - | source
|
|
state: present
|