eendroroy.pyenv
ansible-role-pyenv
Ansible 角色用于安装 pyenv
角色变量
将 pyenv_env: system
设置为全局安装 pyenv,或将 pyenv_env: local
设置为本地安装。
在 pyenv.plugins
变量下添加插件。
在 pythons
变量下定义要安装的 Python 版本。
示例:
pyenv_env: system
pyenv:
plugins:
- { name: pyenv-virtualenv, repo: 'https://github.com/pyenv/pyenv-virtualenv.git' }
pythons:
- version: 2.7.14
支持的操作系统
- Ubuntu
- precise (12.04)
- trusty (14.04)
- xenial (16.04) - xenial 需要安装 python2 以支持 ansible
- CentOS
- 6
- 7
- RHEL
- 6
- 7
示例剧本
---
# 示例剧本
- name: pyenv 设置
hosts: servers
gather_facts: yes
tasks:
- include_role:
name: eendroroy.pyenv
vars:
pyenv_env: system
pythons:
- version: 2.7.14
- version: 3.6.5
贡献
欢迎在 GitHub 的 ansible-role-pyenv 仓库中报告 bug 和提交拉取请求。 本项目旨在为合作提供一个安全、友好的空间,期待贡献者遵守 贡献者守则 的行为守则。
作者
- indrajit - 所有者 - eendroroy
许可证
该项目在 MIT 许可证 下作为开源软件提供。