dirn / ansible-pyenv Goto Github PK
View Code? Open in Web Editor NEWAnsible role - pyenv
Home Page: https://galaxy.ansible.com/list#/roles/3080
License: MIT License
Ansible role - pyenv
Home Page: https://galaxy.ansible.com/list#/roles/3080
License: MIT License
All tasks are executed under the same user. Some tasks (namely, apt) require root access, so the whole role should be executed with "sudo: yes". But in this case pyenv will be installed under root as well, and will go (by default) into /root/.pyenv. It can be overwritten by pyenv_root variable, but it would still be owned by root, which would prevent regular user from using it.
All operations with pyenv itself should be performed with explicit "sudo: no"
TASK [pyenv : Install versions] ************************************************
task path: /Users/yujunz/Develop/denv/roles/pyenv/tasks/main.yml:4
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{pyenv_versions}}').
This feature
will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
When trying this role, it fails to install the versions:
TASK: [dirn.pyenv | Install versions] *****************************************
failed: [c.example.com] => (item=2.7.9) => {"cmd": "pyenv install 2.7.9", "failed": true, "item": "2.7.9", "rc": 2}
msg: [Errno 2] No such file or directory
failed: [c.example.com] => (item=3.4.3) => {"cmd": "pyenv install 3.4.3", "failed": true, "item": "3.4.3", "rc": 2}
msg: [Errno 2] No such file or directory
failed: [c.example.com] => (item=pypy-2.5.0) => {"cmd": "pyenv install pypy-2.5.0", "failed": true, "item": "pypy-2.5.0", "rc": 2}
msg: [Errno 2] No such file or directory
failed: [c.example.com] => (item=pypy3-2.4.0) => {"cmd": "pyenv install pypy3-2.4.0", "failed": true, "item": "pypy3-2.4.0", "rc": 2}
msg: [Errno 2] No such file or directory
FATAL: all hosts have already failed -- aborting
The pyenv
command is not available yet: the Add to run commands
task comes
later, and even then, the pyenv_runcom
would need to be sourced before.
Even though there is a task putting pyenv bin directory into PATH, but the code it produces is executed only if pyenv is already in PATH (basically it is never executed):
- if which pyenv > /dev/null; then
- " export PYENV_ROOT=\\\"$HOME/.pyenv\\\""
- " export PATH=\\\"$PYENV_ROOT/bin:$PATH\\\""
- " eval \\\"$(pyenv init -)\\\""
- "fi # pyenv"
t would be great if we could automate pyenv init
step to actually activate pyenv.
statically included: /Users/yujunz/Develop/denv/roles/pyenv/tasks/osx/pyenv.yml
[DEPRECATION WARNING]: Specifying include variables at the top-level of the task is deprecated. Please see:
http://docs.ansible.com/ansible/playbooks_roles.html#task-include-files-
and-encouraging-reuse
for currently supported syntax regarding included files and variables.
This feature will be removed in a future release. Deprecation warnings can be disabled
by setting deprecation_warnings=False in ansible.cfg.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.