2014-09-05 03:14:11 +08:00
|
|
|
---
|
|
|
|
- name: Create monitor initial keyring
|
2015-03-19 19:21:29 +08:00
|
|
|
command: >
|
|
|
|
ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret | mandatory }} --cap mon 'allow *'
|
|
|
|
creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
2014-09-05 03:14:11 +08:00
|
|
|
|
|
|
|
- name: Set initial monitor key permissions
|
|
|
|
file: >
|
2014-11-14 22:03:50 +08:00
|
|
|
path=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
|
|
|
mode=0600
|
2014-09-05 03:14:11 +08:00
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
|
|
|
|
- name: Create monitor directory
|
|
|
|
file: >
|
|
|
|
path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}
|
|
|
|
state=directory
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
|
|
|
|
|
|
|
- name: Ceph monitor mkfs
|
2015-03-19 19:21:29 +08:00
|
|
|
command: >
|
|
|
|
ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
|
|
|
creates=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|