From 53a366eda9ccc29c4c6e1cef77cacd8793b42747 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 15 Jan 2020 18:40:30 -0500 Subject: [PATCH] tripleo-container-manage: fix check mode If no commands are run, provide an empty default. Change-Id: I32eeab72bdf6538cea749ebe55a6ae65c0f31442 (cherry picked from commit c7a81f95a254a57d6cfac4be263afc315f1e3fcf) --- .../roles/tripleo-container-manage/tasks/podman/create.yml | 2 +- .../roles/tripleo-container-manage/tasks/podman/exec.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/create.yml b/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/create.yml index c852f15f4..bb4b39206 100644 --- a/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/create.yml +++ b/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/create.yml @@ -110,7 +110,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|default([], true) + (all_containers_commands | default([]) | list) }}" - name: "Print the list of containers which changed" debug: diff --git a/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/exec.yml b/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/exec.yml index ef26d94e7..b89449d10 100644 --- a/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/exec.yml +++ b/tripleo_ansible/roles/tripleo-container-manage/tasks/podman/exec.yml @@ -63,4 +63,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|default([], true) + (all_containers_commands | default([]) | list) }}"