From 1c9fa8b7155fe1d3a3d3b73ac2638b9b1458409a Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand <benjamin.bertrand@esss.se> Date: Thu, 23 Aug 2018 14:23:24 +0200 Subject: [PATCH] Fix tag inheritance Dynamic includes and attribute inheritance changed in Ansible 2.5 tags are only applied to the include_* itself and are not inherited by the tasks within. See https://docs.ansible.com/ansible/2.5/porting_guides/porting_guide_2.5.html#dynamic-includes-and-attribute-inheritance --- tasks/create_conda_env.yml | 54 ++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/tasks/create_conda_env.yml b/tasks/create_conda_env.yml index 37ea22a..12586b4 100644 --- a/tasks/create_conda_env.yml +++ b/tasks/create_conda_env.yml @@ -1,30 +1,32 @@ --- -- name: set env_file_path - set_fact: - env_file_path: "/opt/conda/{{ env_file | basename }}" +- block: + - name: set env_file_path + set_fact: + env_file_path: "/opt/conda/{{ env_file | basename }}" -- name: copy local conda environment file - copy: - src: "{{ env_file }}" - dest: "{{ env_file_path }}" - owner: conda - group: users - mode: 0644 - when: not env_file | regex_search('^http') - notify: - - create conda environment + - name: copy local conda environment file + copy: + src: "{{ env_file }}" + dest: "{{ env_file_path }}" + owner: conda + group: users + mode: 0644 + when: not env_file | regex_search('^http') + notify: + - create conda environment -- name: copy conda environment file from url - get_url: - url: "{{ env_file }}" - dest: "{{ env_file_path }}" - force: true - owner: conda - group: users - mode: 0644 - when: env_file | regex_search('^http') - notify: - - create conda environment + - name: copy conda environment file from url + get_url: + url: "{{ env_file }}" + dest: "{{ env_file_path }}" + force: true + owner: conda + group: users + mode: 0644 + when: env_file | regex_search('^http') + notify: + - create conda environment -- name: run the handler to create the environment - meta: flush_handlers + - name: run the handler to create the environment + meta: flush_handlers + tags: conda-env -- GitLab