Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

README.md and bootstrap.sh changes #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ host-02

[coreos:vars]
ansible_ssh_user=core
ansible_python_interpreter="PATH=/home/core/bin:$PATH python"
ansible_python_interpreter="/home/core/bin/python"
```

This will configure ansible to use the python interpreter at `/home/core/bin/python` which will be created by the coreos-bootstrap role.
Expand Down
9 changes: 8 additions & 1 deletion files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,34 @@ set -e

cd

## if already bootstrapped, quit
if [[ -e $HOME/.bootstrapped ]]; then
exit 0
fi

## define download version and URL
PYPY_VERSION=2.4.0
PYPY_URL=https://bitbucket.org/pypy/pypy/downloads

wget -O - https://bitbucket.org/pypy/pypy/downloads/pypy-$PYPY_VERSION-linux64.tar.bz2 |tar -xjf -
## download and untar pypy
wget -O - $PYPY_URL/pypy-$PYPY_VERSION-linux64.tar.bz2 |tar -xjf -
mv -n pypy-$PYPY_VERSION-linux64 pypy

## library fixup
mkdir -p pypy/lib
ln -snf /lib64/libncurses.so.5.9 $HOME/pypy/lib/libtinfo.so.5

## create python shell stub
mkdir -p $HOME/bin

cat > $HOME/bin/python <<EOF
#!/bin/bash
LD_LIBRARY_PATH=$HOME/pypy/lib:$LD_LIBRARY_PATH exec $HOME/pypy/bin/pypy "\$@"
EOF

## make stub executable
chmod +x $HOME/bin/python
$HOME/bin/python --version

## create .bootstrapped file to bypass
touch $HOME/.bootstrapped