diff options
author | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-07-24 08:52:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-07-24 08:52:08 +0000 |
commit | 96f5a4cd4ffdbb39d2357436a8ec84a57eb94d6f (patch) | |
tree | 3f743386cfb6297f52b7ca72c4182d6f22347917 /resources/ansible_roles/ceph-cache-info/tasks | |
parent | 3f64856916977aedaf3fda7ef32d665cbaae1858 (diff) | |
parent | 609417c0f49a421b0c51648fa164fb6cb17a9453 (diff) |
Merge "Add ceph-cache-info role to get the ceph client cache info from ceph nodes."
Diffstat (limited to 'resources/ansible_roles/ceph-cache-info/tasks')
-rw-r--r-- | resources/ansible_roles/ceph-cache-info/tasks/main.yml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/resources/ansible_roles/ceph-cache-info/tasks/main.yml b/resources/ansible_roles/ceph-cache-info/tasks/main.yml new file mode 100644 index 00000000..7e29a325 --- /dev/null +++ b/resources/ansible_roles/ceph-cache-info/tasks/main.yml @@ -0,0 +1,34 @@ +############################################################################## +# Copyright (c) 2017 ZTE Corporation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +- fetch: + src: /etc/ceph/ceph.conf + dest: "{{ qtip_results }}/sysinfo-{{ inventory_hostname }}/" + flat: yes + +- name: collect ceph catch info from ceph.conf + set_fact: {"{{ item }}":"{{ lookup('ini', '{{ item }} section=client default='' file={{ qtip_results }}/sysinfo-{{ inventory_hostname }}/ceph.conf') }}"} + with_items: + - rbd_cache + - rbd_cache_max_dirty + - rdb_cache_size + delegate_to: localhost + ignore_errors: True + register: result + +- name: saving output to log + copy: + content: "{{ item }} {{ item.stdout }}" + dest: "{{ logfile }}" + when: result|succeeded + delegate_to: localhost + with_items: + - rbd_cache + - rbd_cache_max_dirty + - rdb_cache_size |