summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml2
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml2
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml24
3 files changed, 26 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
index 06c28f24..65e7aa17 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
@@ -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
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
index 6ce01b86..65455392 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
@@ -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
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml
index cacc48d8..f89e2c6d 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml
@@ -25,6 +25,13 @@
- 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:
@@ -41,6 +48,23 @@
- 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