2014-03-04 02:08:51 +08:00
|
|
|
---
|
2014-09-05 03:14:11 +08:00
|
|
|
- name: Fail on unsupported system
|
|
|
|
fail: "msg=System not supported {{ ansible_system }}"
|
|
|
|
when: "ansible_system not in ['Linux']"
|
2014-03-04 02:08:51 +08:00
|
|
|
|
2014-09-05 03:14:11 +08:00
|
|
|
- name: Fail on unsupported architecture
|
|
|
|
fail: "msg=Architecture not supported {{ ansible_architecture }}"
|
|
|
|
when: "ansible_architecture not in ['x86_64']"
|
|
|
|
|
|
|
|
- name: Fail on unsupported distribution
|
|
|
|
fail: "msg=Distribution not supported {{ ansible_os_family }}"
|
|
|
|
when: "ansible_os_family not in ['Debian', 'RedHat']"
|
|
|
|
|
|
|
|
- include: install_on_redhat.yml
|
2014-03-10 00:08:47 +08:00
|
|
|
when: ansible_os_family == 'RedHat'
|
2014-11-06 00:57:28 +08:00
|
|
|
|
2014-09-05 03:14:11 +08:00
|
|
|
- include: install_on_debian.yml
|
2014-03-10 00:08:47 +08:00
|
|
|
when: ansible_os_family == 'Debian'
|
2014-09-05 03:14:11 +08:00
|
|
|
|
|
|
|
- name: Check for a Ceph socket
|
|
|
|
shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
|
|
|
|
ignore_errors: true
|
|
|
|
register: socket
|
|
|
|
|
|
|
|
- name: Generate Ceph configuration file
|
|
|
|
template: >
|
2014-11-06 00:57:28 +08:00
|
|
|
src=ceph.conf.j2
|
|
|
|
dest=/etc/ceph/ceph.conf
|
|
|
|
owner=root
|
|
|
|
group=root
|
2014-09-05 03:14:11 +08:00
|
|
|
mode=0644
|
|
|
|
notify:
|
|
|
|
- restart ceph
|
|
|
|
- restart ceph-osd-all on ubuntu
|
|
|
|
|
|
|
|
- name: Disable OSD directory parsing by updatedb
|
|
|
|
command: updatedb -e /var/lib/ceph
|
2014-11-06 00:57:28 +08:00
|
|
|
ignore_errors: true
|