Installs and configures pyenv for the user.
The following collections are required:
- community.general
They can be installed by running ansible-galaxy collection install $COLLECTION
.
To include this role in your requirements.yml
file, add the following list item:
---
roles:
- name: whalej84.pyenv
src: https://github.com/WhaleJ84/ansible-role-pyenv.git
scm: git
collections:
- community.general
Variable | Default | Description |
---|---|---|
pyenv_repo_dir | "/$HOME/opt" | Git repo destination |
This example playbook shows how I would use this role, with custom variables to suit my needs.
---
- hosts: localhost
vars:
# 'repo_dir' shared with:
# - pyenv
repo_dir: "{{ ansible_user_dir }}/Downloads/repositories"
roles:
- role: whalej84.pyenv
vars:
pyenv_repo_dir: "{{ repo_dir }}"
tags: [ pyenv ]