Distinguish zj_source and zj_result and item
The inner item needs to be zj_source. Call the outer zj_result for clarity. Change-Id: Ic5a7b18e1dba71d8dffa171246b52c81e30c6d8f
This commit is contained in:
parent
10cd19fdae
commit
61c4eeaffd
@ -33,15 +33,15 @@
|
|||||||
# which is handled here).
|
# which is handled here).
|
||||||
- name: Set source and destination for files and folders
|
- name: Set source and destination for files and folders
|
||||||
set_fact:
|
set_fact:
|
||||||
source: "{{ zj_source.stat.path }}"
|
source: "{{ zj_result.stat.path }}"
|
||||||
dest: "{{ zj_source.item.value.split('_')[0] }}/{{ zj_source.stat.path|basename|regex_replace('^(\\..*)$', '_\\1') }}{% if zj_source.item.value.endswith('_txt') %}.txt{% endif %}"
|
dest: "{{ zj_result.zj_source.value.split('_')[0] }}/{{ zj_result.stat.path|basename|regex_replace('^(\\..*)$', '_\\1') }}{% if zj_result.zj_source.value.endswith('_txt') %}.txt{% endif %}"
|
||||||
type: "{{ zj_source.item.value.split('_')[0] }}"
|
type: "{{ zj_result.zj_source.value.split('_')[0] }}"
|
||||||
with_items: "{{ sources.results }}"
|
with_items: "{{ sources.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: zj_source
|
loop_var: zj_result
|
||||||
when:
|
when:
|
||||||
- zj_source.stat.exists
|
- zj_result.stat.exists
|
||||||
- zj_source.item.value
|
- zj_result.zj_source.value
|
||||||
register: results
|
register: results
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user