| - name: Check if file already exists |
| when: image_manifest_force is false |
| - name: Get details about file |
| path: "{{ image_manifest_path }}" |
| - name: Stop if file already exists |
| msg: "File {{ image_manifest_path }} already exists, use -e image_manifest_force=true to overwrite" |
| when: image_manifest_mirror |
| crane copy {{ atmosphere_images[item] }} {{ image_manifest_data['atmosphere_images'][item] }} |
| {%- if image_manifest_images is string -%} |
| {{ image_manifest_images | split(',') }} |
| {{ image_manifest_images }} |
| - name: Write file with image list |
| dest: "{{ image_manifest_path }}" |
| content: "{{ image_manifest_data | to_nice_yaml(indent=2) }}" |