Giter Club home page Giter Club logo

ansible-anaconda's Introduction

ansible-anaconda's People

Contributors

andrewrothstein avatar arothste-blk avatar bretdavidson avatar colin-nolan avatar devonberry avatar gitter-badger avatar lejmr avatar mochic avatar msabramo avatar remigius42 avatar spk83 avatar tiagovrtr avatar warfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-anaconda's Issues

Allow multiple anaconda versions to be installed

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

lack of documentation

At this moment this role is still using the template documentation readme file and is lacking even a minimal usage example.

Information like: for which user it would install conda, is this going to replace system python or not? ....

Removing curl is not enough to remove libcurl.a

Your role triggers an error at second run here because removing curl package does not remove libcurl.a file (first run install conda, uninstall curl conda package, let libcurl.a, then second run fails because libcurl.a is still here, so curl conda package uninstall is triggered again and fail because this package is not installed).

Removing libcurl may be a better choice (and also remove curl).

Error at second run:

TASK [andrewrothstein.anaconda : update conda pkgs...] ************************************************************************************************************************************************************
changed: [jupyter.lxc]

TASK [andrewrothstein.anaconda : remove conda-curl since it conflicts with the system curl] ***********************************************************************************************************************
fatal: [jupyter.lxc]: FAILED! => {"changed": true, "cmd": ["/usr/local/anaconda/bin/conda", "remove", "-y", "curl"], "delta": "0:00:01.138967", "end": "2018-02-03 16:01:53.361129", "failed": true, "msg": "non-zero return code", "rc": 1, "start": "2018-02-03 16:01:52.222162", "stderr": "\nPackagesNotFoundError: The following packages are missing from the target environment:\n  - curl", "stderr_lines": ["", "PackagesNotFoundError: The following packages are missing from the target environment:", "  - curl"], "stdout": "Solving environment: ...working... failed", "stdout_lines": ["Solving environment: ...working... failed"]}
	to retry, use: --limit @/home/lalmeras/git/log/jupyter.retry

ModuleNotFoundError: No module named 'distutils.spawn'

Hello,
Running this role against fresh Ubuntu Server 18.04 LTS produces below error on task remove conda-curl since it conflicts with the system curl

{
    "changed": false,
    "module_stderr": "Shared connection to xxx.xxx.xxx.xxx closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/xxx/.ansible/tmp/ansible-tmp-1611129119.9166963-71440610783391/AnsiballZ_conda.py\", line 102, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/gko/.ansible/tmp/ansible-tmp-1611129119.9166963-71440610783391/AnsiballZ_conda.py\", line 94, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/xxx/.ansible/tmp/ansible-tmp-1611129119.9166963-71440610783391/AnsiballZ_conda.py\", line 40, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.conda', init_globals=None, run_name='__main__', alter_sys=True)\r\n  File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\r\n    mod_name, mod_spec, pkg_name, script_name)\r\n  File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_conda_payload_ot31k7m9/ansible_conda_payload.zip/ansible/modules/conda.py\", line 73, in <module>\r\nModuleNotFoundError: No module named 'distutils.spawn'\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

Ansible Version: 2.9.6

module (conda) is missing interpreter line

Thank you for this great project. It successfully installed conda for me (on Centos7 in a vagrant box) but then failed with the following error message.

TASK [andrewrothstein.anaconda : remove conda-curl since it conflicts with the system curl] ***
fatal: [default]: FAILED! => {"msg": "module (conda) is missing interpreter line"}
to retry, use: --limit @/vagrant/playbook.retry

PLAY RECAP *********************************************************************
default : ok=9 changed=5 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

in CentOS 7 the conda binary is defined in the wrong path

The binary for conda has a different name and path prpbably from some changes in the release archives.

The error during the update of conda is here

TASK [andrewrothstein.anaconda : update conda pkgs...] *****************************************************************************************************************************
Tuesday 03 December 2019  12:33:13 -0500 (0:00:00.235)       0:00:27.991 ****** 
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/local/anaconda/bin/conda update -y --all", "msg": "[Errno 2] No such file or directory", "rc": 2}

The new location of the installed binary is here

/usr/local/anaconda/conda.exe

instead of here

/usr/local/anaconda/bin/conda

Failure to uninstall conda-curl with newer versions of Anaconda

I don't think conda-curl is installed with later versions of Anaconda, which causes the remove conda-curl since it conflicts with the system curl step to fail:

FAILED! => {"changed": true, "cmd": ["/usr/local/anaconda-5.1.0/bin/conda", "remove", "-y", "curl"], "delta": "0:00:03.035634", "end": "2018-03-28 08:48:27.526240", "msg": "non-zero return code", "rc": 1, "start": "2018-03-28 08:48:24.490606", "stderr": "\nPackagesNotFoundError: The following packages are missing from the target environment:\n  - curl", "stderr_lines": ["", "PackagesNotFoundError: The following packages are missing from the target environment:", "  - curl"], "stdout": "Solving environment: ...working... failed", "stdout_lines": ["Solving environment: ...working... failed"]}

Perhaps it would be a good idea to use the conda module developed here to remove conda-curl, instead of using a command?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.