Created
October 18, 2016 10:06
-
-
Save Debilski/c7fa43a23afd350bb7573ba4e965f24f to your computer and use it in GitHub Desktop.
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
--- | |
- name: Add Anaconda to Pool | |
hosts: pool | |
user: root | |
tasks: | |
- name: Check, if Anaconda is installed | |
stat: path=/opt/anaconda3/bin/conda | |
register: conda | |
- name: Download Anaconda Python distribution | |
get_url: | |
url: https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh | |
dest: /tmp/Anaconda3-4.2.0-Linux-x86_64.sh | |
checksum: sha256:73b51715a12b6382dd4df3dd1905b531bd6792d4aa7273b2377a0436d45f0e78 | |
mode: 0755 | |
when: conda.stat.exists == False | |
- name: Install Anaconda for Python 3 | |
command: /tmp/Anaconda3-4.2.0-Linux-x86_64.sh -p /opt/anaconda3 -b | |
args: | |
creates: /opt/anaconda3/bin/conda | |
- name: Delete installer | |
file: | |
path=/tmp/Anaconda3-4.2.0-Linux-x86_64.sh | |
state=absent | |
- name: Install Python 2.7 environment | |
command: /opt/anaconda3/bin/conda create -n py27 python=2.7 anaconda | |
args: | |
creates: /opt/anaconda3/envs/py27/bin/conda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment