diff options
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/nfs.yml | 24 |
2 files changed, 14 insertions, 13 deletions
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml index 2df75ca4..6ea5112f 100644 --- a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml +++ b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml @@ -8,9 +8,8 @@ ############################################################################## --- - name: sync glance db - #glance_manage: action=dbsync shell: su -s /bin/sh -c 'glance-manage db sync' glance - ignore_errors: True + ignore_errors: "True" notify: - restart glance services 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 |