]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Adding var to choose between custom and default ceph.conf populated into etcd
authorpprokop <pprokop@gklab-126-023.igk.intel.com>
Mon, 21 Mar 2016 08:42:46 +0000 (09:42 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 24 Mar 2016 15:27:56 +0000 (16:27 +0100)
group_vars/all.docker.sample
roles/ceph-mon/tasks/docker/main.yml
roles/ceph-mon/tasks/docker/start_docker_monitor.yml

index fce0c22a9ca14ee7c1a077a66db51b44cc18379c..0f8b52700593091494839df2321babfaed6f6db9 100644 (file)
@@ -6,6 +6,7 @@ dummy:
 #######
 #mon_containerized_deployment: true
 #mon_containerized_deployment_with_kv: false
+#mon_containerized_default_ceph_conf_with_kv: true
 #kv_type: etcd
 #kv_endpoint: 127.0.0.1
 #kv_port: 4001
index e59dbba11ac983aab9980cffa7615f32f523501a..469cf9357092b250778f91337dba092c60ae4e8d 100644 (file)
@@ -23,7 +23,7 @@
 
 # let the first mon create configs and keyrings
 - include: create_configs.yml
-  when: inventory_hostname == groups.mons[0]
+  when: inventory_hostname == groups.mons[0] and not mon_containerized_default_ceph_conf_with_kv
 
 - include: fetch_configs.yml
   when: not mon_containerized_deployment_with_kv
index 3fa696f591674a5a754293eefd698a3e5e76fcb2..1b5602cf510bd33ae7d77c364e7b280d2ab0534b 100644 (file)
 - name: pull ceph daemon image
   shell: "docker pull {{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}"
 
-- name: populate kv_store
+- name: populate kv_store with default ceph.conf
+  docker:
+    name: populate-kv-store
+    image: ceph/daemon
+    command: populate_kvstore
+    net: host
+    env:
+      KV_TYPE: "{{kv_type}}"
+      KV_IP: "{{kv_endpoint}}"
+      KV_PORT: "{{kv_port}}"
+  run_once: true
+  when: inventory_hostname == groups.mons[0] and mon_containerized_deployment_with_kv
+        and mon_containerized_default_ceph_conf_with_kv
+
+- name: populate kv_store with custom ceph.conf
   docker:
     name: populate-kv-store
     image: ceph/daemon
@@ -25,6 +39,7 @@
       - /etc/ceph/ceph.conf:/etc/ceph/ceph.defaults
   run_once: true
   when: inventory_hostname == groups.mons[0] and mon_containerized_deployment_with_kv
+        and not mon_containerized_default_ceph_conf_with_kv
 
 - name: delete populate-kv-store docker
   docker: