2 - name: init glance db version
3 shell: glance-manage db_version_control 0
6 shell: sleep 15; su -s /bin/sh -c "glance-manage db_sync" glance
12 - restart glance-registry
15 - meta: flush_handlers
17 - name: place image upload script
18 template: src=image_upload.sh dest=/opt/image_upload.sh mode=0744
20 - name: download cirros image file
21 get_url: url={{ build_in_image }} dest=/opt/{{ build_in_image_name }}
23 - name: wait for 9292 port to become available
24 wait_for: host={{ image_host }} port=9292 delay=5
26 - name: run image upload
27 shell: for i in {0..5}; do /opt/image_upload.sh && touch image_upload_completed; if [ $? != 0 ] ;then sleep 5; else break;fi;done
29 creates: image_upload_completed