mirror of https://github.com/ceph/ceph-ansible.git
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
---
|
|
- name: activate monitor with upstart
|
|
file: >
|
|
path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/{{ item }}
|
|
state=touch
|
|
owner=root
|
|
group=root
|
|
mode=0600
|
|
with_items:
|
|
- done
|
|
- upstart
|
|
when: ansible_distribution == "Ubuntu"
|
|
changed_when: false
|
|
|
|
- name: activate monitor with sysvinit
|
|
file: >
|
|
path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/{{ item }}
|
|
state=touch
|
|
owner=root
|
|
group=root
|
|
mode=0600
|
|
with_items:
|
|
- done
|
|
- sysvinit
|
|
when: ansible_distribution != "Ubuntu"
|
|
|
|
- name: start and add that the monitor service to the init sequence (Ubuntu)
|
|
service: >
|
|
name=ceph-mon
|
|
state=started
|
|
enabled=yes
|
|
args="id={{ ansible_hostname }}"
|
|
when: ansible_distribution == "Ubuntu"
|
|
|
|
- name: start and add that the monitor service to the init sequence
|
|
service: >
|
|
name=ceph
|
|
state=started
|
|
enabled=yes
|
|
args=mon
|
|
when: ansible_distribution != "Ubuntu"
|
|
|
|
- name: get Ceph monitor version
|
|
shell: ceph daemon mon."{{ ansible_hostname }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
|
|
changed_when: false
|
|
register: ceph_version
|