summaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-10 11:23:58 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-14 15:15:27 +0800
commit00f4c00451915852ce20b2980e1024e1dd6ef45d (patch)
treeb0cb9bd0556520838ab5dc26e2d069765f969abb /resources
parent4155ef0c478c4eb5513439dabd5553bf389d1803 (diff)
Fix permission issue on apex
root privilege is required for ceph commands Change-Id: Idf42342d0035359d6bcb475d12ea0808d5d26802 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources')
-rw-r--r--resources/ansible_roles/ceph-disk-info/tasks/main.yml9
1 files changed, 6 insertions, 3 deletions
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