mdklatt / ansible-python3-role Goto Github PK
View Code? Open in Web Editor NEWAnsible role for installing Python 3.
License: MIT License
Ansible role for installing Python 3.
License: MIT License
Install the pipenv utility.
In .travis.yml, molecule test
needs to be molecule test --parallel --all
so that both the default
and pyenv
scenarios are run.
As of ansible 2.8:
[DEPRECATION WARNING]: Invoking "yum" only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying `name: "{{ item }}"`, please use `name: ['python36u',
'python36u-devel', 'python36u-pip']` and remove the loop. This feature will be
removed in version 2.11. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
Default installs to root user and I tried with become_user & sudo then it installs to root user :(
I am using Vagarnt CentOS7
My Playbook
gather_facts: yes
become_user: vagrant
remote_user: vagrant
become: true
become_method: sudo
vars_files:
- vars/main.yml
roles:
- mdklatt.python3
My Vars
python3_pyenv: "3.5.6"
python3_command: python3.5
python3_bashrc: "/home/vagrant/.bash_profile"
python3_local: "/home/vagrant/.local/bin"
The Galaxy webhook needs to be uncommented in .travis.yml
to trigger automatic imports of new releases.
# TODO
#notifications:
# webhooks: https://galaxy.ansible.com/api/v1/notifications/
CentOS: python36u-devel
Ubuntu: python3.6-dev
The pyenv installer now fails if it detects an existing installation, which causes the role to fail:
TASK [python3 : run pyenv installer] *******************************************
task path: python3-role/tasks/pyenv.yml:12
fatal: [centos]: FAILED! => {"changed": true, "cmd": ["bash", "pyenv-installer"], "delta": "0:00:00.006871", "end": "2019-02-23 21:57:48.493896", "msg": "non-zero return code", "rc": 1, "start": "2019-02-23 21:57:48.487025", "stderr": "\nWARNING: Can not proceed with installation. Kindly remove '.pyenv' from /home/vagrant first.", "stderr_lines": ["", "WARNING: Can not proceed with installation. Kindly remove '.pyenv' from /home/vagrant first."], "stdout": "", "stdout_lines": []}
RUNNING HANDLER [mdklatt.tmpdir : tmpdir remove] ******************************* fatal: [electrumx.multicoin.co]: FAILED! => {"changed": false, "msg": "rmtree failed: [Errno 13] Permission denied: '/tmp/ansible.nslmf_jp'"}
It looks like CentOS has finally added Python 3.6 to @base
, and the IUS python36u*
packages now point to the new base packages. Update the role to point directly to the @base
packages.
This is not a breaking change for this role, but there are surprises for downstream packages that require the old IUS packages. For example, installing uwsgi-plugin-python36u
fails because it cannot find python36u
, which is now just python3@base
(FYI, uwsgi-plugin-python36@epel
can be used as a replacement).
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.