aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/glance/tasks/nfs.yml')
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml24
1 files changed, 13 insertions, 11 deletions
diff --git a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
index f0176c89..36d176f2 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
@@ -16,28 +16,28 @@
with_items:
- rpcbind
- nfs-utils
- run_once: True
+ run_once: "True"
- name: create image directory
local_action: file path=/opt/images state=directory mode=0777
- run_once: True
+ run_once: "True"
- name: remove nfs config item if exist
local_action: lineinfile dest=/etc/exports state=absent
regexp="^/opt/images"
- run_once: True
+ run_once: "True"
- name: update nfs config
local_action: lineinfile dest=/etc/exports state=present
line="/opt/images *(rw,insecure,sync,all_squash)"
- run_once: True
+ run_once: "True"
- name: restart compass nfs service
local_action: service name={{ item }} state=restarted enabled=yes
with_items:
- - rpcbind
- - nfs-server
- run_once: True
+ - rpcbind
+ - nfs-server
+ run_once: "True"
- name: get mount info
command: mount
@@ -57,10 +57,12 @@
- name: mount image directory
shell: |
- 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
+ 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 \
+ fsvers=3 >> /etc/fstab;
when: mount_info.stdout.find('images') == -1
retries: 5
delay: 3