diff options
author | 2016-02-24 07:41:29 +0000 | |
---|---|---|
committer | 2016-02-24 07:41:29 +0000 | |
commit | e38c1a6d08b10ea81d208bd40b9df1a13d28db8c (patch) | |
tree | 44beff459154f239469579882e559c2027649d95 /deploy/adapters/ansible/roles/ceph-mon | |
parent | 3eab3cd722870e6c02ee1337d3536dc68f89b13e (diff) | |
parent | e72bc045fd467a442a0ffb1c78e710a270a59dfa (diff) |
Merge "Support version Liberty of OpenStack for CENTOS7"
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-mon')
4 files changed, 42 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 diff --git a/deploy/adapters/ansible/roles/ceph-mon/vars/Debian.yml b/deploy/adapters/ansible/roles/ceph-mon/vars/Debian.yml new file mode 100644 index 00000000..16b7989b --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-mon/vars/Debian.yml @@ -0,0 +1,12 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- + +ceph_start_script: "start ceph-mon id={{ inventory_hostname }}" +ceph_start_type: "upstart" diff --git a/deploy/adapters/ansible/roles/ceph-mon/vars/RedHat.yml b/deploy/adapters/ansible/roles/ceph-mon/vars/RedHat.yml new file mode 100644 index 00000000..fa19fc08 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-mon/vars/RedHat.yml @@ -0,0 +1,12 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- + +ceph_start_script: "/etc/init.d/ceph start mon.{{ inventory_hostname }}" +ceph_start_type: "sysvinit" diff --git a/deploy/adapters/ansible/roles/ceph-mon/vars/main.yml b/deploy/adapters/ansible/roles/ceph-mon/vars/main.yml new file mode 100644 index 00000000..466ea6ab --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-mon/vars/main.yml @@ -0,0 +1,10 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- + |