From 92f6ca7bb6d7b2f295406aab34094b1dba76ff94 Mon Sep 17 00:00:00 2001 From: liyuenan Date: Tue, 27 Dec 2016 17:44:34 +0800 Subject: Yamllint test JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan --- .../ansible/roles/glance/tasks/glance_config.yml | 3 +-- deploy/adapters/ansible/roles/glance/tasks/nfs.yml | 24 ++++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'deploy/adapters/ansible/roles/glance/tasks') 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 -- cgit 1.2.3-korg