bindep: remove set_fact usage when converting string to list
This can cause problems where set_fact isn't able to override the variable when bindep is used with include_role and bindep_file is set as a variable in the include_role task. Change-Id: I3099f1802f2d30df1265a9abc11a53c923ed4832
This commit is contained in:
parent
57a2f59f5a
commit
6f2ff3f1b8
@ -10,13 +10,8 @@
|
||||
- bindep_file is defined
|
||||
- bindep_command is not defined
|
||||
|
||||
- name: Convert bindep_file to list
|
||||
set_fact:
|
||||
bindep_file: "{{ [bindep_file] }}"
|
||||
when: bindep_file is defined and bindep_file is string
|
||||
|
||||
- include_tasks: packages.yaml
|
||||
loop: "{{ bindep_file }}"
|
||||
loop: "{{ bindep_file is string | ternary([bindep_file], bindep_file) }}"
|
||||
loop_control:
|
||||
loop_var: zj_bindep_file
|
||||
when: bindep_file is defined
|
||||
|
Loading…
Reference in New Issue
Block a user