Render ceph.conf using merge_configs

At present, cinder/nova/glance/gnocchi relative containers's
ceph.conf aren't be merge from user custom's config.
In some condition, we should add extra parameter to custom's
ceph.conf, for example:rbd_default_features = 1.

So, it is necessary to use merge_configs instead of template.
Closes-Bug: #1656162

Change-Id: I824e0c68af270b85c52382ae35987213266fc6f6
This commit is contained in:
jackning 2017-01-13 11:13:35 +08:00
parent 031a9d462b
commit b25c6b15fe
4 changed files with 30 additions and 12 deletions

View File

@ -8,9 +8,14 @@
- "cinder-backup"
when: inventory_hostname in groups['cinder-volume']
- name: Copying over config(s)
template:
src: roles/ceph/templates/ceph.conf.j2
- name: Copying over ceph.conf(s)
merge_configs:
vars:
service_name: "{{ item }}"
sources:
- "{{ role_path }}/../ceph/templates/ceph.conf.j2"
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
with_items:
- "cinder-volume"

View File

@ -5,9 +5,12 @@
state: "directory"
when: inventory_hostname in groups['glance-api']
- name: Copying over config(s)
template:
src: roles/ceph/templates/ceph.conf.j2
- name: Copying over ceph.conf(s)
merge_configs:
sources:
- "{{ role_path }}/../ceph/templates/ceph.conf.j2"
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/glance-api/ceph.conf"
when: inventory_hostname in groups['glance-api']

View File

@ -9,9 +9,14 @@
- "gnocchi-metricd"
- "gnocchi-statsd"
- name: Copying over config(s)
template:
src: roles/ceph/templates/ceph.conf.j2
- name: Copying over ceph.conf(s)
merge_configs:
vars:
service_name: "{{ item }}"
sources:
- "{{ role_path }}/../ceph/templates/ceph.conf.j2"
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
when: inventory_hostname in groups[item]
with_items:

View File

@ -8,9 +8,14 @@
- "nova-libvirt/secrets"
when: inventory_hostname in groups['compute']
- name: Copying over config(s)
template:
src: roles/ceph/templates/ceph.conf.j2
- name: Copying over ceph.conf(s)
merge_configs:
vars:
service_name: "{{ item }}"
sources:
- "{{ role_path }}/../ceph/templates/ceph.conf.j2"
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
with_items:
- "nova-compute"