@@ -1,4 +1,4 @@ | |||||
--- | --- | ||||
conda_distribution: Miniconda3 | |||||
conda_directory: /opt/{{ conda_distribution }} | |||||
conda_directory: /opt/conda | |||||
conda_installer_url: https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh | |||||
conda_installer_checksum: sha256:ea4594241e13a2671c5b158b3b813f0794fe58d514795fbf72a1aad24db918cf |
@@ -2,20 +2,29 @@ | |||||
- name: download installer | - name: download installer | ||||
get_url: | get_url: | ||||
url: "{{ _conda_installer_download_url }}" | |||||
dest: "/tmp/{{ _conda_installer_filename }}" | |||||
checksum: "{{ _conda_installer_checksum }}" | |||||
url: "{{ conda_installer_url }}" | |||||
dest: "/opt/{{ _conda_installer_filename }}" | |||||
checksum: "{{ conda_installer_checksum }}" | |||||
mode: 0755 | mode: 0755 | ||||
owner: root | owner: root | ||||
group: root | group: root | ||||
- name: install | - name: install | ||||
command: /tmp/{{ _conda_installer_filename }} -b -u -p {{ conda_directory }} | |||||
vars: | |||||
command: /opt/{{ _conda_installer_filename }} -b -p {{ conda_directory }} | |||||
args: | |||||
creates: "{{ conda_directory }}/bin/conda" | creates: "{{ conda_directory }}/bin/conda" | ||||
- name: update | |||||
command: conda update --all --json --quiet | |||||
environment: | |||||
PATH: /opt/conda/bin:{{ ansible_env.PATH }} | |||||
register: _conda_update_command | |||||
failed_when: _conda_update_command.rc != 0 and not _conda_update.sucess | |||||
changed_when: _conda_update.actions is defined | |||||
- name: link conda fish | - name: link conda fish | ||||
file: | file: | ||||
src: "{{ conda_directory }}/etc/fish/conf.d/conda.fish" | src: "{{ conda_directory }}/etc/fish/conf.d/conda.fish" | ||||
dest: /etc/fish/conf.d/conda.fish | dest: /etc/fish/conf.d/conda.fish | ||||
state: link | state: link | ||||
follow: false |
@@ -1,17 +1,4 @@ | |||||
--- | --- | ||||
_conda_installer_download_url: "{{ _conda_installer_download_url_map[conda_distribution] }}" | |||||
_conda_installer_download_url_map: | |||||
Anaconda3: https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh | |||||
Anaconda2: https://repo.anaconda.com/archive/Anaconda2-5.3.0-Linux-x86_64.sh | |||||
Miniconda3: https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh | |||||
Miniconda2: https://repo.continuum.io/miniconda/Miniconda2-4.5.11-Linux-x86_64.sh | |||||
_conda_installer_filename: "{{ _conda_installer_download_url | urlsplit('path') | basename }}" | |||||
_conda_installer_checksum: "{{ _conda_installer_checksum_map[conda_distribution] }}" | |||||
_conda_installer_checksum_map: | |||||
Anaconda3: sha256:cfbf5fe70dd1b797ec677e63c61f8efc92dad930fd1c94d60390bb07fdc09959 | |||||
Anaconda2: sha256:50eeaab24bfa2472bc6485fe8f0e612ed67e561eda1ff9fbf07b62c96443c1be | |||||
Miniconda3: md5:e1045ee415162f944b6aebfe560b8fee | |||||
Miniconda2: md5:458324438b7b0e5afcc272b63d44195d | |||||
_conda_installer_filename: "{{ conda_installer_url | urlsplit('path') | basename }}" | |||||
_conda_update: "{{ _conda_update_command.stdout | from_json }}" |