From: Yujun Zhang Date: Thu, 10 Aug 2017 03:23:58 +0000 (+0800) Subject: Fix permission issue on apex X-Git-Tag: opnfv-5.0.0~36^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F31%2F39031%2F2;p=qtip.git Fix permission issue on apex root privilege is required for ceph commands Change-Id: Idf42342d0035359d6bcb475d12ea0808d5d26802 Signed-off-by: Yujun Zhang --- diff --git a/resources/ansible_roles/ceph-disk-info/tasks/main.yml b/resources/ansible_roles/ceph-disk-info/tasks/main.yml index 3186e3dd..6bb88e69 100644 --- a/resources/ansible_roles/ceph-disk-info/tasks/main.yml +++ b/resources/ansible_roles/ceph-disk-info/tasks/main.yml @@ -8,8 +8,9 @@ ############################################################################## -- name: get ceph disk information - shell: ceph-disk list +- name: get ceph disk information + become: true + command: ceph-disk list register: ceph_disk_out - name: saving output to log @@ -19,10 +20,11 @@ delegate_to: localhost - name: get ceph journal information + become: true shell: lsblk -d -o name,rota |awk '{if ($2 == 0) printf "%s SSD \n",$1 }' register: ceph_journal_out -- name: append +- name: append lineinfile: dest: "{{ logfile }}" line: "{{ ceph_journal_out.stdout }}" @@ -30,6 +32,7 @@ delegate_to: localhost - name: get ceph report + become: true command: ceph report register: ceph_report_out