From: pprokop Date: Mon, 21 Mar 2016 08:42:46 +0000 (+0100) Subject: Adding var to choose between custom and default ceph.conf populated into etcd X-Git-Tag: v1.0.3~11^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=eef421716d969f05732261cd5486734041fc28a5;p=ceph-ansible.git Adding var to choose between custom and default ceph.conf populated into etcd --- diff --git a/group_vars/all.docker.sample b/group_vars/all.docker.sample index fce0c22a9..0f8b52700 100644 --- a/group_vars/all.docker.sample +++ b/group_vars/all.docker.sample @@ -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 diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index e59dbba11..469cf9357 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -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 diff --git a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml index 3fa696f59..1b5602cf5 100644 --- a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml +++ b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml @@ -11,7 +11,21 @@ - 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: