Created
January 7, 2017 15:05
-
-
Save ericmdev/93da2e6fa673bd4d79a86277c47e29f5 to your computer and use it in GitHub Desktop.
Install Python on CoreOS and configure Ansible Interpreter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Install Python on CoreOS | |
VERSIONS=${VERSIONS:-"2.7.8.10"} | |
mkdir -p /opt/bin | |
cd /opt | |
wget http://downloads.activestate.com/ActivePython/releases/${VERSIONS}/ActivePython-${VERSIONS}-linux-x86_64.tar.gz | |
tar -xzvf ActivePython-${VERSIONS}-linux-x86_64.tar.gz | |
mv ActivePython-${VERSIONS}-linux-x86_64 apy && cd apy && ./install.sh -I /opt/python/ | |
ln -s /opt/python/bin/easy_install /opt/bin/easy_install | |
ln -s /opt/python/bin/pip /opt/bin/pip | |
ln -s /opt/python/bin/python /opt/bin/python | |
ln -s /opt/python/bin/virtualenv /opt/bin/virtualenv | |
# export PATH | |
# export PATH=/opt/python/bin:$PATH | |
### Configure Ansible Interpreter | |
# inventory/example | |
# [example] | |
# example-01 ansible_ssh_host=127.0.0.1 | |
# [example:vars] | |
# ansible_ssh_user=core | |
# ansible_python_interpreter=/opt/python/bin/python | |
# ansible_connection=ssh | |
# ansible_ssh_port=22 | |
# ansible_ssh_private_key_file=id_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment