Merge "Corrected links associated with release docs. To be updated along with the...
[genesis.git] / compass / deploy / ansible / openstack_juno / roles / glance / tasks / glance_config.yml
1 ---
2 - name: init glance db version
3   shell: glance-manage db_version_control 0
4
5 - name: sync glance db
6   shell: sleep 15; su -s /bin/sh -c "glance-manage db_sync" glance
7   register: result
8   until: result.rc == 0
9   retries: 5
10   delay: 3
11   notify:
12     - restart glance-registry
13     - restart glance-api
14
15 - meta: flush_handlers
16
17 - name: place image upload script
18   template: src=image_upload.sh dest=/opt/image_upload.sh mode=0744
19
20 - name: download cirros image file
21   get_url: url={{ build_in_image }} dest=/opt/{{ build_in_image_name }}
22
23 - name: wait for 9292 port to become available
24   wait_for: host={{ image_host }} port=9292 delay=5
25
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
28   args:
29     creates: image_upload_completed