summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-deploy/tasks
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2015-11-27 10:54:43 +0800
committergrakiss <grakiss.wanglei@huawei.com>2015-11-27 10:54:43 +0800
commit2f0dbdd9c8bb49b66054f08cce93e8ab4825f873 (patch)
treee167ef6717dad462f5389c7de2885f373b60568c /deploy/adapters/ansible/roles/ceph-deploy/tasks
parenta5d9a6384c09ff8e84c7e6bfefb9b9202b0c2341 (diff)
split ceph into small size roles with specific purpose
JIRA: COMPASS-152 - add ceph_adm ceph_mon ceph_osd Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-deploy/tasks')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml10
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml10
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml20
3 files changed, 30 insertions, 10 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 744120b8..7c9545ef 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 {{ controller_nodes.stdout_lines[0] }}
+ shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ mon_nodes.stdout_lines[0] }}
tags:
- create_ceph_cluster
@@ -25,21 +25,21 @@
- name: copy create_osd.sh to other nodes
shell: scp -o StrictHostKeyChecking=no ~/create_osd.sh {{ item }}:~/
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
- name: create osd
shell: ssh -o StrictHostKeyChecking=no -t {{ item }} "~/create_osd.sh"
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
- name: prepare create osd
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd prepare {{ item }}:/var/local/osd
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
@@ -47,7 +47,7 @@
- name: activate osd
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd activate {{ item }}:/var/local/osd && ceph-deploy osd activate {{ item }}:/var/local/osd
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
- activate_osd
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 385c7571..d907170f 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 {{ controller_nodes.stdout_lines[0] }}
+ shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ mon_nodes.stdout_lines[0] }}
tags:
- create_ceph_cluster
@@ -25,21 +25,21 @@
- name: copy create_osd.sh to other nodes
shell: scp -o StrictHostKeyChecking=no ~/create_osd.sh {{ item }}:~/
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
- name: create osd
shell: ssh -o StrictHostKeyChecking=no -t {{ item }} "~/create_osd.sh"
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
- name: prepare create osd
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd prepare {{ item }}:/var/local/osd
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
@@ -47,7 +47,7 @@
- name: activate osd
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd activate {{ item }}:/var/local/osd
with_items:
- - "{{ groups['compute'] }}"
+ - "{{ groups['ceph_osd'] }}"
tags:
- create_osd
- activate_osd
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 f89e2c6d..0f3ad60c 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
@@ -31,6 +31,11 @@
- create_ceph_cluster
- ceph_install
+- name: clear ceph_mon_nodes
+ file: path=ceph_mon_nodes state=absent
+ tags:
+ - create_ceph_cluster
+ - ceph_install
- name: echo hosts name to file
shell: echo -n "{{ item }} " >> cluster_hosts_name
@@ -64,6 +69,21 @@
- echo_hosts
- ceph_install
+- name: echo ceph-mon name to file
+ shell: echo -n "{{ item }} " >> ceph_mon_nodes
+ with_items:
+ - "{{ groups['ceph_mon'] }}"
+ tags:
+ - create_ceph_cluster
+ - ceph_install
+
+- name: register ceph-mon nodes
+ shell: cat ceph_mon_nodes
+ register: mon_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