mirror of https://github.com/ceph/ceph-ansible.git
commit
6060a7e56a
|
@ -10,7 +10,7 @@ redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, s
|
|||
# Ceph options
|
||||
cephx: true
|
||||
mds: false # disable mds configuration in ceph.conf
|
||||
fsid: 4a158d27-f750-41d5-9e7f-26ce4c9d2d45
|
||||
fsid: # /!\ GENERATE ONE WITH 'uuidgen -r' /!\
|
||||
|
||||
# Monitors options
|
||||
monitor_interface: eth1
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
# Variables here are applicable to all host groups NOT roles
|
||||
|
||||
# Monitor options
|
||||
monitor_secret: AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==
|
|
@ -2,14 +2,22 @@
|
|||
## Deploy Ceph monitor(s)
|
||||
#
|
||||
|
||||
- name: Generate monitor initial keyring
|
||||
command: ceph-authtool -C foo --gen-print-key creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||
when: ansible_hostname == hostvars[groups['mons'][0]]['ansible_hostname'] and cephx
|
||||
register: monitor_secret
|
||||
|
||||
- set_fact: 'monitor_secret="{{ monitor_secret.stdout }}"'
|
||||
when: ansible_hostname == hostvars[groups['mons'][0]]['ansible_hostname'] and cephx
|
||||
|
||||
- name: Create monitor initial keyring
|
||||
command: ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *' creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||
command: ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ hostvars[groups['mons'][0]]['monitor_secret'] }} --cap mon 'allow *' creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||
|
||||
- name: Set initial monitor key permissions
|
||||
file: path=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} mode=0600 owner=root group=root
|
||||
|
||||
- name: Create monitor directory
|
||||
action: file path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }} state=directory owner=root group=root mode=0644
|
||||
file: path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }} state=directory owner=root group=root mode=0644
|
||||
|
||||
- name: Ceph monitor mkfs
|
||||
command: ceph-mon --mkfs -i {{ ansible_hostname }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} creates=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|
||||
|
|
Loading…
Reference in New Issue