2014-03-04 02:08:51 +08:00
|
|
|
---
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./checks/check_system.yml
|
2014-03-04 02:08:51 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./checks/check_mandatory_vars.yml
|
2015-07-04 02:18:41 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./misc/system_tuning.yml
|
2015-07-01 00:13:03 +08:00
|
|
|
when: osd_group_name in group_names
|
2014-09-05 03:14:11 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./pre_requisites/prerequisite_ice.yml
|
2014-12-18 01:01:44 +08:00
|
|
|
when: ceph_stable_ice
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./pre_requisites/prerequisite_rh_storage_iso_install.yml
|
2015-07-03 22:56:34 +08:00
|
|
|
when:
|
|
|
|
ceph_stable_rh_storage and
|
|
|
|
ceph_stable_rh_storage_iso_install
|
2015-07-03 00:23:11 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./pre_requisites/prerequisite_rh_storage_cdn_install.yml
|
2015-07-03 22:56:34 +08:00
|
|
|
when:
|
|
|
|
ceph_stable_rh_storage and
|
|
|
|
ceph_stable_rh_storage_cdn_install
|
2015-07-01 21:58:38 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./installs/install_on_redhat.yml
|
2015-01-07 18:25:34 +08:00
|
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- include: ./installs/install_on_debian.yml
|
2015-01-07 18:25:34 +08:00
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: check for a ceph socket
|
2015-01-07 18:25:34 +08:00
|
|
|
shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2015-01-07 18:25:34 +08:00
|
|
|
ignore_errors: true
|
|
|
|
register: socket
|
|
|
|
|
2015-07-01 00:07:03 +08:00
|
|
|
- name: check for a rados gateway socket
|
|
|
|
shell: "stat {{ rbd_client_admin_socket_path }}*.asok > /dev/null 2>&1"
|
|
|
|
changed_when: false
|
|
|
|
ignore_errors: true
|
|
|
|
register: socketrgw
|
|
|
|
|
2015-07-25 11:10:39 +08:00
|
|
|
- name: create a local fetch directory if it doesn't exist
|
|
|
|
local_action: file path=fetch state=directory
|
|
|
|
changed_when: false
|
|
|
|
sudo: false
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: generate cluster uuid
|
2015-07-03 22:25:17 +08:00
|
|
|
local_action: shell uuidgen | tee fetch/ceph_cluster_uuid.conf
|
2015-03-19 19:21:29 +08:00
|
|
|
creates=fetch/ceph_cluster_uuid.conf
|
2015-01-07 18:25:34 +08:00
|
|
|
register: cluster_uuid
|
2015-06-26 06:26:03 +08:00
|
|
|
sudo: false
|
2015-07-18 00:08:24 +08:00
|
|
|
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
|
2015-01-07 18:25:34 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: read cluster uuid if it already exists
|
2015-07-03 22:25:17 +08:00
|
|
|
local_action: command cat fetch/ceph_cluster_uuid.conf
|
2015-03-19 19:21:29 +08:00
|
|
|
removes=fetch/ceph_cluster_uuid.conf
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2015-01-07 18:25:34 +08:00
|
|
|
register: cluster_uuid
|
2015-06-26 06:26:03 +08:00
|
|
|
sudo: false
|
2015-07-18 00:08:24 +08:00
|
|
|
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
|
2015-01-07 18:25:34 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: generate ceph configuration file
|
2015-01-07 18:25:34 +08:00
|
|
|
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
|
2015-07-01 00:07:03 +08:00
|
|
|
- restart ceph mons on ubuntu
|
2015-03-03 00:13:30 +08:00
|
|
|
- restart ceph osds
|
|
|
|
- restart ceph osds on ubuntu
|
|
|
|
- restart ceph mdss
|
2015-07-01 00:07:03 +08:00
|
|
|
- restart ceph mdss on ubuntu
|
2015-03-03 00:13:30 +08:00
|
|
|
- restart ceph rgws
|
2015-07-01 00:07:03 +08:00
|
|
|
- restart ceph rgws on ubuntu
|
|
|
|
- restart ceph rgws on red hat
|
2015-06-17 19:44:05 +08:00
|
|
|
|
|
|
|
- name: create rbd client directory
|
|
|
|
file: >
|
|
|
|
path={{ rbd_client_admin_socket_path }}
|
|
|
|
state=directory
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|