ansible-anaconda icon indicating copy to clipboard operation
ansible-anaconda copied to clipboard

Allow multiple anaconda versions to be installed

Open bilsch opened this issue 7 years ago • 5 comments

It would be nice to have the link be optional. In my case I need both anaconda2 and 3 to be installed / maintained.

- hosts: all
  become: yes
  become_method: sudo
  gather_facts: true
  vars:
    python_versions:
      - 2
      - 3
(...)
  tasks:
(...)
    - name: "Install anaconda for python versions"
      with_items: "{{ python_versions }}"
      loop_control:
        loop_var: version
      include_role:
        name: andrewrothstein.anaconda
      vars:
        anaconda_parent_dir: /hadoop/anaconda
        anaconda_python_ver: "{{ version }}"

I can think of a few ways to tackle this - thoughts on what you would prefer? Simply making the link optional may work however I can see where you would want to have anaconda2 symlink to latest for 2, ditto for anaconda3.

Happy to submit a pr

bilsch avatar Feb 07 '18 20:02 bilsch

Have you considered using docker to isolate the installs? Build one image that houses the v2 install and another than houses the v3 install?

andrewrothstein avatar Feb 09 '18 21:02 andrewrothstein

Thats an interesting idea though I'm not sure it will work for my use-case. This is on a hadoop cluster for pyspark. We have kerberos, ssl and other security goodies and docker does not play well.

bilsch avatar Feb 09 '18 21:02 bilsch

I like the idea of having /usr/local/anaconda{2,3}. I really like the idea of having a single path to “the currently installed anaconda distribution”. I’m conflicted.

andrewrothstein avatar Feb 11 '18 00:02 andrewrothstein

Let me work up a pull request and see if we can have it both ways. Default to a single version with your current logic.

Give me a few days. I've got a few other things going on at the moment

bilsch avatar Feb 11 '18 00:02 bilsch

Maybe this helps: https://github.com/dockpack/base_miniconda

  • multiple environments in a docker base image or on a host.

bbaassssiiee avatar Jan 11 '20 12:01 bbaassssiiee