[ceph]deploy mon nodes on controller nodes 51/3051/1
authorgraiss <grakiss.wanglei@huawei.com>
Thu, 5 Nov 2015 08:18:43 +0000 (16:18 +0800)
committergraiss <grakiss.wanglei@huawei.com>
Thu, 5 Nov 2015 08:18:43 +0000 (16:18 +0800)
JIRA:COMPASS-138
  - deploy mon nodes on all nodes is bad and waste of resource,so just delpoy on controller nodeswq

Change-Id: I1987a4571225fe3a6b3bebbb9fec921d1dffa9b5
Signed-off-by: graiss <grakiss.wanglei@huawei.com>
deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml

index 06c28f2..65e7aa1 100644 (file)
@@ -1,6 +1,6 @@
 ---
 - name: create ceph cluster
-  shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ ceph_cluster_hosts.stdout_lines[0] }}
+  shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ controller_nodes.stdout_lines[0] }}
   tags:
     - create_ceph_cluster
 
index 6ce01b8..6545539 100644 (file)
@@ -1,6 +1,6 @@
 ---
 - name: create ceph cluster
-  shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ ceph_cluster_hosts.stdout_lines[0] }}
+  shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ controller_nodes.stdout_lines[0] }}
   tags:
     - create_ceph_cluster
 
index cacc48d..f89e2c6 100644 (file)
     - create_ceph_cluster
     - ceph_install
 
+- name: clear cluster_controller_nodes
+  file: path=cluster_controller_nodes state=absent
+  tags:
+    - create_ceph_cluster
+    - ceph_install
+
+
 - name: echo hosts name to file
   shell: echo -n "{{ item }} " >> cluster_hosts_name
   with_items:
     - echo_hosts
     - ceph_install
 
+- name: echo controller name to file
+  shell: echo -n "{{ item }} " >> cluster_controller_nodes
+  with_items:
+    - "{{ groups['controller'] }}"
+  tags:
+    - create_ceph_cluster
+    - ceph_install
+
+- name: register controller nodes
+  shell: cat cluster_controller_nodes
+  register: controller_nodes
+  tags:
+    - create_ceph_cluster
+    - echo_hosts
+    - ceph_install
+
+
 - name: gen clean ceph script
   template: src=clean_ceph.j2 dest=~/clean_ceph.sh mode=0777