I am creating an environment and installing some packages. However, when I run the playbook again, it doesn't say "OK", but takes a while and says "changed". I am using state: present instead of latest and would expect it to finish quickly with "OK" when the environment already exists. Is there any way to get it to do that?
Example task:
- name: Install amalea environment
become: yes
conda:
executable: /opt/tljh/user/bin/mamba
environment: amalea
state: present
channels:
- conda-forge
- defaults
name:
- python=3.9.7
- pip
Edit: it seems the culprit is that I gave the environment name, not a path. The function list_envs parses the output of conda env list --json, which only returns the paths.
I am creating an environment and installing some packages. However, when I run the playbook again, it doesn't say "OK", but takes a while and says "changed". I am using
state: presentinstead oflatestand would expect it to finish quickly with "OK" when the environment already exists. Is there any way to get it to do that?Example task:
Edit: it seems the culprit is that I gave the environment name, not a path. The function
list_envsparses the output ofconda env list --json, which only returns the paths.