]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
serialize containerized mon config
authorHuamin Chen <hchen@redhat.com>
Fri, 5 Feb 2016 18:50:57 +0000 (18:50 +0000)
committerSébastien Han <seb@redhat.com>
Thu, 24 Mar 2016 15:16:08 +0000 (16:16 +0100)
Signed-off-by: Huamin Chen <hchen@redhat.com>
roles/ceph-mon/tasks/docker/create_configs.yml [new file with mode: 0644]
roles/ceph-mon/tasks/docker/main.yml
roles/ceph-mon/tasks/docker/start_docker_monitor.yml

diff --git a/roles/ceph-mon/tasks/docker/create_configs.yml b/roles/ceph-mon/tasks/docker/create_configs.yml
new file mode 100644 (file)
index 0000000..ff59a9a
--- /dev/null
@@ -0,0 +1,18 @@
+---
+- name: create ceph conf directory
+  file:
+      path: /etc/ceph
+      state: directory
+      owner: root
+      group: root
+      mode: 0644
+
+- name: generate ceph configuration file
+  config_template:
+    src: "{{ playbook_dir }}/roles/ceph-common/templates/ceph.conf.j2"
+    dest: /etc/ceph/ceph.conf
+    owner: "root"
+    group: "root"
+    mode: "0644"
+    config_overrides: "{{ ceph_conf_overrides }}"
+    config_type: ini
index 5c74a9201f869a329f2507fb50fdb8191c739956..e1965301fe824fe55721ef14aa660a49b93de032 100644 (file)
@@ -20,6 +20,9 @@
 - include: selinux.yml
   when: ansible_os_family == 'RedHat'
 
+# let the first mon create configs and keyrings
+- include: create_configs.yml
+  when: inventory_hostname == groups.mons[0]
 - include: fetch_configs.yml
 - include: start_docker_monitor.yml
 - include: ../ceph_keys.yml
index 0a269fcd073c03ca2b5289cf486d7c3d92a6ff9f..7fa861852e81959bdcd5f55cbf7e0e8de2549311 100644 (file)
@@ -79,3 +79,4 @@
     - ceph_bootstrap_config_keys
     - statmonconfig.results
   when: item.1.stat.exists == true
+        and inventory_hostname == groups.mons[0]