]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add option to skip generating fsid 569/head
authorChris St. Pierre <chris.a.st.pierre@gmail.com>
Thu, 25 Feb 2016 16:29:12 +0000 (10:29 -0600)
committerChris St. Pierre <chris.a.st.pierre@gmail.com>
Thu, 25 Feb 2016 16:29:12 +0000 (10:29 -0600)
If using another method to generate a consistent fsid, then we can
skip creation of an (unused) cluster UUID file. If cephx is disabled
as well, we can skip creation of the fetch directory entirely.

group_vars/all.sample
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/main.yml

index a7fd246729d7b152ec88fb1da04582605aed92f5..c3d3218eee8229906e5e6724b5f9475aaa5bb87e 100644 (file)
@@ -144,7 +144,15 @@ dummy:
 
 ## Ceph options
 #
+# Each cluster requires a unique, consistent filesystem ID. By
+# default, the playbook generates one for you and stores it in a file
+# in `fetch_directory`. If you want to customize how the fsid is
+# generated, you may find it useful to disable fsid generation to
+# avoid cluttering up your ansible repo. If you set `generate_fsid` to
+# false, you *must* generate `fsid` in another way.
 #fsid: "{{ cluster_uuid.stdout }}"
+#generate_fsid: true
+
 #cephx: true
 #cephx_require_signatures: true # Kernel RBD does NOT support signatures!
 #cephx_cluster_require_signatures: true
index 43a73f68cb5f85f400769967d9ee9d55d50790cb..0f4e0672854a0c51b954f2d98dafce899914aee8 100644 (file)
@@ -146,7 +146,15 @@ ceph_dev_redhat_distro: centos7
 \r
 ## Ceph options\r
 #\r
+# Each cluster requires a unique, consistent filesystem ID. By\r
+# default, the playbook generates one for you and stores it in a file\r
+# in `fetch_directory`. If you want to customize how the fsid is\r
+# generated, you may find it useful to disable fsid generation to\r
+# avoid cluttering up your ansible repo. If you set `generate_fsid` to\r
+# false, you *must* generate `fsid` in another way.\r
 fsid: "{{ cluster_uuid.stdout }}"\r
+generate_fsid: true\r
+\r
 cephx: true\r
 cephx_require_signatures: true # Kernel RBD does NOT support signatures for Kernels < 3.18!\r
 cephx_cluster_require_signatures: true\r
index b795bce6bd7f40673f9fea969b1bdd32084f189c..09341ced79ecb269ca9da74e39c714228e31cf10 100644 (file)
   changed_when: false
   become: false
   run_once: true
+  when:
+    cephx or
+    generate_fsid
 
 - name: generate cluster uuid
   local_action: shell python -c 'import uuid; print str(uuid.uuid4())' | tee {{ fetch_directory }}/ceph_cluster_uuid.conf
     creates="{{ fetch_directory }}/ceph_cluster_uuid.conf"
   register: cluster_uuid
   become: false
+  when: generate_fsid
 
 - name: read cluster uuid if it already exists
   local_action: command cat {{ fetch_directory }}/ceph_cluster_uuid.conf
   changed_when: false
   register: cluster_uuid
   become: false
+  when: generate_fsid
 
 - name: create ceph conf directory
   file: