aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/glance
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-10-28 06:34:56 +0800
committerQiLiang <liangqi1@huawei.com>2016-10-28 06:36:13 +0800
commit0c03889e4bc5236c841683762d46429310c0dee7 (patch)
tree6a81648cd87322ba08b9bea2e4f1a7b2daf8718d /deploy/adapters/ansible/roles/glance
parent5ac0350135d59f143b91115170b5690631e3f448 (diff)
Fix glance images dir mount issue on centos/rhel
JIRA: - The directory /var/lib/glance/images is not created on centos/rhel system, create it before fs mount. Change-Id: Iec070ad834d6a6206f11923088a73a8dcfe173f9 Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/glance')
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
index 179229de..482be22e 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
@@ -53,7 +53,8 @@
- name: mount image directory
shell: |
- mount -t nfs -onfsvers=3 {{ ip_info.stdout_lines[0] }}:/opt/images /var/lib/glance/images
+ mkdir -p /var/lib/glance/images
+ mount -t nfs -onfsvers=3 {{ ip_info.stdout_lines[0] }}:/opt/images /var/lib/glance/images
sed -i '/\/var\/lib\/glance\/images/d' /etc/fstab
#echo {{ ip_info.stdout_lines[0] }}:/opt/images /var/lib/glance/images/ nfs nfsvers=3 >> /etc/fstab
when: mount_info.stdout.find('images') == -1