Skip to content

Instantly share code, notes, and snippets.

@aksakalli
Created July 18, 2018 10:08
Show Gist options
  • Save aksakalli/72d54b22ce4da2ee81eb1a58cbc67a0c to your computer and use it in GitHub Desktop.
Save aksakalli/72d54b22ce4da2ee81eb1a58cbc67a0c to your computer and use it in GitHub Desktop.
Installing Minicaonda/Anaconda from Ansible playbook for all
- name: Install Conda
block:
- name: Download Miniconda
get_url:
url: https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
dest: /tmp/install-miniconda.sh
checksum: md5:a946ea1d0c4a642ddf0c3a26a18bb16d
mode: 0550
- name: Create conda folder
become: True
file:
path: /opt/miniconda3
state: directory
owner: ubuntu
mode: 755
recurse: yes
- name: Run the installer
shell: /tmp/install-miniconda.sh -b -u -p /opt/miniconda3
- name: Remove the installer
file:
state: absent
path: /tmp/install-miniconda.sh
- name: Add miniconda bin to path
become: True
shell: echo 'export PATH=/opt/miniconda3/bin:$PATH' >> /etc/profile
- name: conda - read permission for all
become: True
file:
path: /opt/miniconda3
mode: +r
recurse: yes
- name: conda - execution permission for all
become: True
file:
path: /opt/miniconda3/bin
mode: +x
recurse: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment