2022-07-08 03:18:56 +02:00
|
|
|
- name: 'Set conda env file basename'
|
|
|
|
tags:
|
|
|
|
- 'testing'
|
|
|
|
set_fact:
|
|
|
|
conda_env_file_base: '{{ conda_env_file | basename }}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: 'Set conda env file absolute path'
|
|
|
|
tags:
|
|
|
|
- 'testing'
|
|
|
|
set_fact:
|
|
|
|
conda_env_file_abs: '{{ miniconda_envs_dir }}/{{ conda_env_file_base | regex_search(''.*?\.yml'', ''\0'') | first }}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: 'Set conda env name'
|
|
|
|
tags:
|
|
|
|
- 'testing'
|
|
|
|
set_fact:
|
|
|
|
conda_env_name: '{{ conda_env_file_base | regex_search(''(.*?)(_conda_environment.yml)'', ''\1'') | first }}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: 'Store conda environment.yml file'
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: '{{ conda_env_file }}'
|
|
|
|
dest: '{{ conda_env_file_abs }}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: 'Set up conda env ''{{ conda_env_name }}'''
|
|
|
|
tags:
|
|
|
|
- 'testing'
|
|
|
|
register: 'rv_conda_env_install'
|
|
|
|
changed_when: 'not rv_conda_env_install.stderr'
|
|
|
|
failed_when: 'false'
|
|
|
|
ansible.builtin.shell: '{{ miniconda_conda_binary }} env create --quiet --file ''{{ conda_env_file_abs }}'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
#- name: Display paths of all .txt files in dir
|
|
|
|
# tags:
|
|
|
|
# - 'testing'
|
|
|
|
# ansible.builtin.debug: msg={{ lookup('ansible.builtin.fileglob', '_conda_envs_dir_/**', wantlist=True) }}
|
|
|
|
|
|
|
|
- name: 'Debug vars'
|
|
|
|
tags:
|
|
|
|
- 'testing'
|
|
|
|
debug:
|
|
|
|
msg: 'asd'
|
2022-07-07 03:20:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# conda deactivate && conda update -y --name base conda && conda update -y --all
|
|
|
|
|
|
|
|
#- name: '...'
|
|
|
|
# tags:
|
|
|
|
# - 'inTesting'
|
|
|
|
# delegate_to: '127.0.0.1'
|
|
|
|
# run_once: true
|
|
|
|
# async: 1
|
|
|
|
# poll: 0
|
|
|
|
# no_log: true
|
|
|
|
# when: '...'
|
|
|
|
# register: '...'
|
|
|
|
# become: 'yes'
|
|
|
|
# changed_when: '...'
|
|
|
|
# failed_when: '...'
|
|
|
|
# until: '(condition)'
|
|
|
|
# retries: 5
|
|
|
|
# delay: 10
|
|
|
|
# loop_control:
|
|
|
|
# loop_var: 'loopVar'
|
|
|
|
# loop:
|
|
|
|
# - { var1: '', var2: '' }
|
|
|
|
# - { ... }
|
|
|
|
# <command>:
|
|
|
|
# argument1: '{{ loopVar.var1 }}'
|
|
|
|
# argument2: '{{ loopVar.var2 }}'
|
|
|
|
#
|