ceph-ansible/roles/ceph-common/tasks/main.yml

51 lines
1.1 KiB
YAML
Raw Normal View History

---
- include: os_check.yml
- include: os_tuning.yml
2014-09-05 03:14:11 +08:00
- include: prerequisite_ice.yml
when: ceph_stable_ice
- 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
changed_when: False
- name: Generate cluster UUID
shell: >
uuidgen | tee fetch/ceph_cluster_uuid.conf
creates=fetch/ceph_cluster_uuid.conf
connection: local
sudo: false
register: cluster_uuid
- name: Read cluster UUID if it already exists
command: >
cat fetch/ceph_cluster_uuid.conf
removes=fetch/ceph_cluster_uuid.conf
connection: local
sudo: false
register: cluster_uuid
changed_when: False
- name: Generate Ceph configuration file
template: >
src=ceph.conf.j2
dest=/etc/ceph/ceph.conf
owner=root
group=root
mode=0644
notify:
- restart ceph mons
- restart ceph osds
- restart ceph osds on ubuntu
- restart ceph mdss
- restart ceph rgws