staticdev.pyenv
Rol de Ansible: Pyenv
Rol de Ansible Galaxy para pyenv en Debian / Ubuntu / RedHat / OSX.
Instálalo con el siguiente comando:
$ ansible-galaxy install staticdev.pyenv
Requisitos
Ninguno.
Variables del Rol
Aquí está la lista de todas las variables y sus valores predeterminados:
pyenv_version: "HEAD"
- consulta https://github.com/pyenv/pyenv/releasespyenv_virtualenv_version: "HEAD"
- consulta https://github.com/pyenv/pyenv-virtualenv/releasespyenv_update_version: "HEAD"
- generalmente no tiene lanzamientos, pero se puede especificar un hash de compromisopyenv_env: "user"
(debe ser"user"
o"system"
)pyenv_path: "{% if pyenv_env == 'user' %}{{ ansible_env.HOME }}/pyenv{% else %}/usr/local/pyenv{% endif %}"
pyenvrc_path: "{{ pyenv_path }}"
pyenv_owner: "{{ ansible_facts.user_id }}"
pyenv_owner_group: "{{ pyenv_owner }}"
pyenv_python_versions: [3.12.1]
pyenv_virtualenvs: [{ venv_name: latest, py_version: 3.12.1 }]
pyenv_global: [3.12.1]
pyenv_update_git_install: true
(obtener la última versión de pyenv desde git)pyenv_enable_autocompletion: false
pyenv_enable_virtualenvs: true
pyenv_shellrc_file: "{% if pyenv_env == 'user' %}~/.bashrc{% else %}/etc/profile.d/pyenv.sh{% endif %}"
pyenv_tmpdir: (debe definirse explícitamente)
- variable de entornoTMPDIR
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_build_path: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_BUILD_PATH
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_cache_path: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_CACHE_PATH
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_mirror_url: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_MIRROR_URL
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_mirror_url_skip_checksum: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_MIRROR_URL_SKIP_CHECKSUM
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_skip_mirror: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_SKIP_MIRROR
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_skip_homebrew: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_SKIP_HOMEBREW
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_root: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_ROOT
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_build_definitions: (debe definirse explícitamente)
- variable de entornoPYTHON_BUILD_DEFINITIONS
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_configure_opts: (debe definirse explícitamente)
- variable de entornoPYTHON_CONFIGURE_OPTS
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_cflags: (debe definirse explícitamente)
- variable de entornoPYTHON_CFLAGS
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_make_opts: (debe definirse explícitamente)
- variable de entornoPYTHON_MAKE_OPTS
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_python_make_install_opts: (debe definirse explícitamente)
- variable de entornoPYTHON_MAKE_INSTALL_OPTS
utilizada por python-build como se describe en Variables de Entorno Especiales.pyenv_profile_task: (debe definirse explícitamente)
- variable de entornoPROFILE_TASK
para personalizar la tarea utilizada para optimización guiada por perfil como se describe en construyendo Python para un rendimiento máximo. Consulta también aquí.pyenv_custom_pyenvrc_file: (debe definirse explícitamente)
- ruta a un archivo de shell.pyenvrc
personalizado que será referenciado desde{{ pyenvrc_path }}/.pyenvrc
. Te permite personalizar libremente el entorno que se utilizará durante la ejecución depyenv
. Si se define, este archivo se copiará como{{ pyenvrc_path }}/.pyenvrc.custom
.pyenv_install_extra_opts: ("" -sin opciones adicionales-)
- consulta la salida depyenv install --help
para opciones adicionales disponibles.
Dependencias
Ninguna.
Ejemplo de Playbook
- hosts: servers
roles:
- role: staticdev.pyenv
vars:
# de https://github.com/pyenv/pyenv/releases
pyenv_version: "v2.3.35"
# de https://github.com/pyenv/pyenv-virtualenv/releases
pyenv_virtualenv_version: "v1.2.1"
# de https://github.com/pyenv/pyenv-update/commits/master/
pyenv_update_version: "172a0ed"
pyenv_shellrc_file: "{{ ansible_env.HOME }}/.shrc"
pyenv_path: "{{ ansible_env.HOME }}/.pyenv"
pyenvrc_path: "{{ ansible_env.HOME }}"
pyenv_owner: "{{ instance_owner }}"
pyenv_global:
- 3.12.1
- 3.11.7
pyenv_enable_autocompletion: false
pyenv_python_versions:
- 3.12.1
- 3.11.7
pyenv_virtualenvs:
- venv_name: latest_v312
py_version: 3.12.1
- venv_name: latest_v311
py_version: 3.11.7
pyenv_make_opts: "-j4"
pyenv_python_configure_opts: "--enable-optimizations --with-lto --with-ensurepip=upgrade"
pyenv_python_cflags: "-march=native -mtune=native"
pyenv_profile_task: "-m test.regrtest --pgo -j0"
Licencia
Distribuido bajo los términos de la licencia MIT,
Ansible role Pyenv es software libre y de código abierto.
Información del Autor
staticdev. Basado en gran medida en avanov.pyenv de Maxim Avanov.
Instalar
ansible-galaxy install staticdev.pyenv
Licencia
mit
Descargas
170.7k
Propietario