From 38b41e1382c88dddb329589645b75cf855296b1f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 5 Jan 2018 14:21:59 +0100 Subject: [PATCH] conda: The executables must be referenced with full path anyway. --- conda/tasks/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/conda/tasks/main.yml b/conda/tasks/main.yml index af6bf5ae..b1ebb865 100644 --- a/conda/tasks/main.yml +++ b/conda/tasks/main.yml @@ -20,8 +20,7 @@ - block: - name: Create a conda environment -# shell: export PATH={{ conda_install_prefix }}/bin:{{ ansible_env.PATH }} ; {{ conda_install_prefix }}/bin/conda create -y -n {{ item.env_name }} {{ item.env_opts }} - shell: conda create -y -n {{ item.env_name }} {{ item.env_opts }} + shell: export PATH={{ conda_install_prefix }}/bin:{{ ansible_env.PATH }} ; {{ conda_install_prefix }}/bin/conda create -y -n {{ item.env_name }} {{ item.env_opts }} environment: PATH: 'PATH={{ conda_install_prefix }}/bin:{{ ansible_env.PATH }}' args: @@ -30,8 +29,7 @@ with_items: '{{ conda_env_pkgs }}' - name: Install additional packages and libraries inside the conda environment - #shell: export PATH={{ conda_install_prefix }}/bin:{{ ansible_env.PATH }} ; source {{ conda_install_prefix }}/bin/activate {{ item.env_name }} ; {{ conda_install_prefix }}/bin/conda install -y {{ item.repo_list }} {{ item.pkg }} ; touch {{ conda_install_prefix }}/envs/{{ item.env_name }}/.{{ item.pkg }} - shell: source activate {{ item.env_name }} ; conda install -y {{ item.repo_list }} {{ item.pkg }} ; touch {{ conda_install_prefix }}/envs/{{ item.env_name }}/.{{ item.pkg }} + shell: export PATH={{ conda_install_prefix }}/bin:{{ ansible_env.PATH }} ; source {{ conda_install_prefix }}/bin/activate {{ item.env_name }} ; {{ conda_install_prefix }}/bin/conda install -y {{ item.repo_list }} {{ item.pkg }} ; touch {{ conda_install_prefix }}/envs/{{ item.env_name }}/.{{ item.pkg }} environment: PATH: 'PATH={{ conda_install_prefix }}/bin:{{ ansible_env.PATH }}' args: