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

38 lines
1.2 KiB
YAML

---
- include: deploy_monitors.yml
# Wait for mon discovery and quorum resolution
# the admin key is not instantanely created so we have to wait a bit
- name: wait for client.admin key exists
wait_for: path=/etc/ceph/ceph.client.admin.keyring
- name: Create RGW keyring
command: ceph auth get-or-create client.radosgw.gateway osd 'allow rwx' mon 'allow rw' -o /etc/ceph/keyring.radosgw.gateway creates=/etc/ceph/keyring.radosgw.gateway
when: cephx and radosgw
changed_when: False
- include: openstack_config.yml
when: openstack_config
- name: Copy keys to the ansible server
fetch: >
src={{ item }}
dest=fetch/{{ fsid }}/{{ item }}
flat=yes
when: cephx
with_items:
- /etc/ceph/ceph.client.admin.keyring # just in case another application needs it
- /var/lib/ceph/bootstrap-osd/ceph.keyring # this handles the non-colocation case
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/keyring.radosgw.gateway
- name: Drop in a motd script to report status when logging in
copy: >
src=precise/92-ceph
dest=/etc/update-motd.d/92-ceph
owner=root
group=root
mode=0755
when: ansible_distribution_release == 'precise'