diff options
author | your name <email@163.com> | 2015-09-09 03:26:11 -0400 |
---|---|---|
committer | your name <email@163.com> | 2015-09-09 03:26:11 -0400 |
commit | 72039e915d1fc960bd0d7fccd910ea282d61bee7 (patch) | |
tree | 60452129b1b9f3c3419b4a29a038f5f0cbade5f7 /deploy/adapters/ansible/roles/glance/tasks | |
parent | cf87d3067a63cb8be315a3addfd9c27d86be3b5a (diff) |
Compass Netconfig optimization
Change-Id: Icbcfc7d794623436f22be5f6763b212a25d4fac7
JIRA: COMPASS-30
Diffstat (limited to 'deploy/adapters/ansible/roles/glance/tasks')
-rw-r--r-- | deploy/adapters/ansible/roles/glance/tasks/glance_config.yml | 3 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/glance/tasks/main.yml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml index 0960acfc..e2390d0e 100644 --- a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml +++ b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml @@ -1,10 +1,12 @@ --- - name: init glance db version shell: glance-manage db_version_control 0 + run_once: True when: ansible_os_family == "Debian" - name: sync glance db shell: sleep 15; su -s /bin/sh -c "glance-manage db_sync" glance + run_once: True register: result until: result.rc == 0 retries: 5 @@ -28,6 +30,7 @@ wait_for: host={{ image_host }} port=9292 delay=5 - name: run image upload + run_once: True shell: for i in {0..5}; do /opt/image_upload.sh && touch image_upload_completed; if [ $? != 0 ] ;then sleep 5; else break;fi;done args: creates: image_upload_completed diff --git a/deploy/adapters/ansible/roles/glance/tasks/main.yml b/deploy/adapters/ansible/roles/glance/tasks/main.yml index 5d7db8e9..64b8ca9d 100644 --- a/deploy/adapters/ansible/roles/glance/tasks/main.yml +++ b/deploy/adapters/ansible/roles/glance/tasks/main.yml @@ -12,7 +12,7 @@ - nfs - include: glance_config.yml - when: HA_CLUSTER is not defined or HA_CLUSTER[inventory_hostname] == '' + run_once: True tags: - config - glance_config |