[queens-only] Write docker config scripts only if config exists

Do not try to write docker config scripts if the
docker_config_scripts.yaml doesn't exist.

I832a2ec34f4ed4a87e30d0c88f4c60bcf2f4c151 was reverted so there is no
default hash provided to the loop introduced in
I1fc7431dfc662212b6ca64f4f738760f25b0c30b so the simplest patch
(one-liner) is to run the task only when the file exist (like the
previous fact which sets the var used).

Another way to fix it would have been to revert the revert but it has
proven to break some CI jobs, so this is the simplest way to fix it now.

Change-Id: I67da243a7543dcea7af16e964810c4c32e8ecbe1
Closes-Bug: #1831455
This commit is contained in:
Emilien Macchi 2019-06-03 09:31:27 -04:00
parent 23ceec390d
commit 073851d328
1 changed files with 1 additions and 0 deletions

View File

@ -130,6 +130,7 @@
loop: "{{ role_data_docker_config_scripts | dictsort }}"
loop_control:
label: "{{ item[0] }}"
when: stat_docker_config_scripts.stat.exists
tags:
- container_config_scripts