浏览代码

Azure: use empty dict if input image has no tags

Root images usually have only `valid: true` tag, which is ignored when setting
tags for the new image, thus when combining old tags with new, the variable
containing old tags would be undefined and the ansible task fails.
Peter Schiffer 6 年之前
父节点
当前提交
4200496646
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      playbooks/azure/openshift-cluster/tasks/create_image_from_vm.yml

+ 1 - 1
playbooks/azure/openshift-cluster/tasks/create_image_from_vm.yml

@@ -43,7 +43,7 @@
 
 - name: calculate final tags
   set_fact:
-    final_tags: "{{ input_image_tags_no_valid | combine(image_tags) }}"
+    final_tags: "{{ input_image_tags_no_valid | default({}) | combine(image_tags) }}"
 
 - name: tag image
   command: >