tripleo-container-image: add |list to containers_commands

If the variable is empty, let's use the |list filter which will convert
the emptry string into an empty list.

Change-Id: I39fc122ec66b7029bae247ee6d4a6fdbb614a5e4
This commit is contained in:
Emilien Macchi 2020-01-13 20:35:22 -05:00
parent 17d97f2618
commit b2287480a3
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@
var: containers_commands
- name: "Append the list of all podman commands that are run for containers with changes"
set_fact:
all_containers_commands: "{{ containers_commands + (all_containers_commands | default([]) | list) }}"
all_containers_commands: "{{ containers_commands|list + (all_containers_commands | default([]) | list) }}"
- name: "Print the list of containers which changed"
debug:

View File

@ -60,4 +60,4 @@
var: containers_commands
- name: "Append the list of all podman commands that are run for containers with changes"
set_fact:
all_containers_commands: "{{ containers_commands + (all_containers_commands | default([]) | list) }}"
all_containers_commands: "{{ containers_commands|list + (all_containers_commands | default([]) | list) }}"