]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
take-over: use more precise ceph.conf detection 1155/head
authorSébastien Han <seb@redhat.com>
Tue, 6 Dec 2016 14:02:49 +0000 (15:02 +0100)
committerSébastien Han <seb@redhat.com>
Tue, 6 Dec 2016 15:02:48 +0000 (16:02 +0100)
Prior to this patch we were just looking for any *.conf file which
sometimes could results in multiple matches. The new command looks for a
.conf file that must contain [global] and 'fsid' patterns. This will
definitely get us the ceph.conf file. We can not directly use ceph.conf
because of a different cluster name.

Signed-off-by: Sébastien Han <seb@redhat.com>
infrastructure-playbooks/take-over-existing-cluster.yml

index 8347c1bef5c8901f3fb015ca983a566894d7a0a4..08b31bd5915616d7694b1c79addf33d2a877b26c 100644 (file)
@@ -27,7 +27,8 @@
     - include_vars: group_vars/all.yml
 
     - name: get the name of the existing ceph cluster
-      shell: "ls /etc/ceph/*.conf"
+      shell: |
+        grep -lE '\[global\]|fsid' /etc/ceph/*.conf
       changed_when: false
       register: ceph_conf