aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/glance/tasks
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-27 17:44:34 +0800
committerliyuenan <liyuenan@huawei.com>2017-01-05 09:42:35 +0800
commit92f6ca7bb6d7b2f295406aab34094b1dba76ff94 (patch)
treec4e62927a3bf9862f7ba9ce286cbece2c4335ef4 /deploy/adapters/ansible/roles/glance/tasks
parent6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (diff)
Yamllint test
JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/glance/tasks')
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_config.yml3
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml24
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