소스 검색

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: >