summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-mon/tasks
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-02-24 07:41:29 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-02-24 07:41:29 +0000
commite38c1a6d08b10ea81d208bd40b9df1a13d28db8c (patch)
tree44beff459154f239469579882e559c2027649d95 /deploy/adapters/ansible/roles/ceph-mon/tasks
parent3eab3cd722870e6c02ee1337d3536dc68f89b13e (diff)
parente72bc045fd467a442a0ffb1c78e710a270a59dfa (diff)
Merge "Support version Liberty of OpenStack for CENTOS7"
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-mon/tasks')
-rw-r--r--deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml14
1 files changed, 8 insertions, 6 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml b/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml
index 3b818ea2..658d109e 100644
--- a/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml
+++ b/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml
@@ -7,20 +7,22 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+- include_vars: "{{ ansible_os_family }}.yml"
+
- name: Create a default data directory
file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}" state="directory"
- name: Populate the monitor daemon
shell: "ceph-mon --mkfs -i {{ inventory_hostname }} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring"
-- name: Touch the done file
- file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}/done" state="touch"
+- name: Touch the done and auto start file
+ file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}/{{ item }}" state="touch"
+ with_items:
+ - "done"
+ - "{{ ceph_start_type }}"
- name: start mon daemon
- shell: start ceph-mon id={{ inventory_hostname }}
-
-- name: auto start ceph-mon
- file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}/upstart" state="touch"
+ shell: "{{ ceph_start_script }}"
- name: wait for creating osd keyring
wait_for: path=/var/lib/ceph/bootstrap-osd/ceph.keyring