2014-03-04 02:08:51 +08:00
|
|
|
---
|
2015-01-07 18:41:35 +08:00
|
|
|
- include: os_check.yml
|
2014-03-04 02:08:51 +08:00
|
|
|
|
2015-01-07 18:41:35 +08:00
|
|
|
- include: os_tuning.yml
|
2014-09-05 03:14:11 +08:00
|
|
|
|
2015-01-07 18:41:35 +08:00
|
|
|
- include: prerequisite_ice.yml
|
2014-12-18 01:01:44 +08:00
|
|
|
when: ceph_stable_ice
|
|
|
|
|
2015-01-07 18:25:34 +08:00
|
|
|
- include: install_on_redhat.yml
|
|
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
|
|
|
|
- include: install_on_debian.yml
|
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
|
|
|
|
- name: Check for a Ceph socket
|
|
|
|
shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
|
|
|
|
ignore_errors: true
|
|
|
|
register: socket
|
2015-04-09 00:46:54 +08:00
|
|
|
changed_when: False
|
2015-01-07 18:25:34 +08:00
|
|
|
|
|
|
|
- name: Generate cluster UUID
|
2015-03-19 19:21:29 +08:00
|
|
|
shell: >
|
|
|
|
uuidgen | tee fetch/ceph_cluster_uuid.conf
|
|
|
|
creates=fetch/ceph_cluster_uuid.conf
|
2015-01-07 18:25:34 +08:00
|
|
|
connection: local
|
|
|
|
sudo: false
|
|
|
|
register: cluster_uuid
|
|
|
|
|
|
|
|
- name: Read cluster UUID if it already exists
|
2015-03-19 19:21:29 +08:00
|
|
|
command: >
|
|
|
|
cat fetch/ceph_cluster_uuid.conf
|
|
|
|
removes=fetch/ceph_cluster_uuid.conf
|
2015-01-07 18:25:34 +08:00
|
|
|
connection: local
|
|
|
|
sudo: false
|
|
|
|
register: cluster_uuid
|
2015-04-09 00:46:54 +08:00
|
|
|
changed_when: False
|
2015-01-07 18:25:34 +08:00
|
|
|
|
|
|
|
- name: Generate Ceph configuration file
|
|
|
|
template: >
|
|
|
|
src=ceph.conf.j2
|
|
|
|
dest=/etc/ceph/ceph.conf
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
|
|
|
notify:
|
2015-03-03 00:13:30 +08:00
|
|
|
- restart ceph mons
|
|
|
|
- restart ceph osds
|
|
|
|
- restart ceph osds on ubuntu
|
|
|
|
- restart ceph mdss
|
|
|
|
- restart ceph rgws
|