Merge pull request #984 from thotypous/master

Allow deployer to customize openstack pools
pull/997/head
Leseb 2016-09-22 11:34:53 +02:00 committed by GitHub
commit eb8b59f409
3 changed files with 14 additions and 6 deletions

View File

@ -61,6 +61,12 @@ dummy:
# name: backups
# pg_num: "{{ pool_default_pg_num }}"
#openstack_pools:
# - "{{ openstack_glance_pool }}"
# - "{{ openstack_cinder_pool }}"
# - "{{ openstack_nova_pool }}"
# - "{{ openstack_cinder_backup_pool }}"
#openstack_keys:
# - { name: client.glance, value: "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ openstack_glance_pool.name }}'" }
# - { name: client.cinder, value: "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ openstack_cinder_pool.name }}, allow rwx pool={{ openstack_nova_pool.name }}, allow rx pool={{ openstack_glance_pool.name }}'" }

View File

@ -53,6 +53,12 @@ openstack_cinder_backup_pool:
name: backups
pg_num: "{{ pool_default_pg_num }}"
openstack_pools:
- "{{ openstack_glance_pool }}"
- "{{ openstack_cinder_pool }}"
- "{{ openstack_nova_pool }}"
- "{{ openstack_cinder_backup_pool }}"
openstack_keys:
- { name: client.glance, value: "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ openstack_glance_pool.name }}'" }
- { name: client.cinder, value: "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ openstack_cinder_pool.name }}, allow rwx pool={{ openstack_nova_pool.name }}, allow rx pool={{ openstack_glance_pool.name }}'" }

View File

@ -1,11 +1,7 @@
---
- name: create openstack pool
command: ceph --cluster {{ cluster }} osd pool create {{ item.name }} {{ item.pg_num }}
with_items:
- "{{ openstack_glance_pool }}"
- "{{ openstack_cinder_pool }}"
- "{{ openstack_nova_pool }}"
- "{{ openstack_cinder_backup_pool }}"
with_items: "{{ openstack_pools }}"
changed_when: false
failed_when: false
@ -13,6 +9,6 @@
command: ceph --cluster {{ cluster }} auth get-or-create {{ item.name }} {{ item.value }} -o /etc/ceph/{{ cluster }}.{{ item.name }}.keyring
args:
creates: /etc/ceph/{{ cluster }}.{{ item.name }}.keyring
with_items: openstack_keys
with_items: "{{ openstack_keys }}"
changed_when: false
when: cephx