bootstrap-os: simplify pip3 installation on coreos

pull/4033/head
Markus Teufelberger 2019-01-12 15:05:33 +01:00
parent 5b5546adf1
commit 5e2c14e916
2 changed files with 10 additions and 21 deletions

View File

@ -1,3 +0,0 @@
#!/bin/bash
BINDIR="/opt/bin"
LD_LIBRARY_PATH=$BINDIR/pypy3/lib:$LD_LIBRARY_PATH $BINDIR/pypy3/bin/$(basename $0) $@

View File

@ -23,27 +23,19 @@
tags:
- facts
- name: Bootstrap | Check if we need to install pip
shell: "pip3 --version"
register: need_pip
failed_when: false
changed_when: false
check_mode: no
tags:
- facts
environment:
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"
- name: Bootstrap | Install pip3
command: "{{ ansible_python_interpreter }} -m ensurepip"
args:
creates: "{{ bin_dir }}/pypy3/bin/pip3"
register: pip_installed
- name: Bootstrap | Install pip
shell: "{{ ansible_python_interpreter }} -m ensurepip"
when: need_pip.rc != 0
- name: Bootstrap | Install pip launcher
copy:
src: runner
- name: Bootstrap | Install pip3 link
file:
src: "{{ bin_dir }}/pypy3/bin/pip3"
dest: "{{ bin_dir }}/pip3"
mode: 0755
when: need_pip.rc != 0
state: link
when: pip_installed.changed
- name: Install required python modules
pip: