ansible-conda
ansible-conda copied to clipboard
How to install packages into specific conda environment?
How do I use this module to install package to specific environment?
For example, Given that I have Anaconda installed under /opt/anaconda2/, and that I have manually created environment called 'myconda'
I want to write a task to install package pip into environment 'myconda'
Here is an example task:
- name: Install pip via conda module conda: name: pip state: latest executable: /opt/anaconda2/bin/conda extra_args: - "-n myconda"
This does not work in my environment with ansible 2.4.3.0
Do you get an error, or does it end up installing into the default environment?
I feel the conda ansible module install should work like the conda create command and create the environment if it does not exist.
- name: Create virtual environment rtp and install biopython conda: name=biopython state=latest extra_args="-n rtp" executable="{{ app_home }}/rtp/anaconda3/bin/conda"
Instead, conda ansible module errors:
TASK [rtp-python : Create virtual environment rtp and install biopython] *************************
fatal: [eric-rtp-python.preprod.com]: FAILED! => {"changed": false, "module_stderr": "Shared connection to eric-rtp-python.preprod.com closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File "/tmp/ansible_XRIZTY/ansible_module_conda.py", line 373, in