rgw/multisite: assign 'rgw_zone' to the exact section in ceph.conf

since the following commit:
  commit 1ac94c048f
  rgw: add support for multiple rgw instances on a single host

we have multi-instance rgw support on a single host and
the config section name of the rgw changed from
[client.rgw.$(hostname)] -> [client.rgw.$(hostname).rgwX]
when X is the sequence number: 0,1,2,...
So we should assign 'rgw_zone' item to the exact rgw instance
config section in ceph.conf

Signed-off-by: guihecheng <guihecheng@cmiot.chinamobile.com>
pull/2962/head
guihecheng 2019-01-23 09:36:25 +08:00 committed by Guillaume Abrioux
parent 327d564106
commit a0590cae9d
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@
- name: add zone to rgw stanza in ceph.conf
ini_file:
dest: "/etc/ceph/{{ cluster }}.conf"
section: "client.rgw.{{ ansible_hostname }}"
section: "client.rgw.{{ ansible_hostname }}.{{ item.instance_name }}"
option: "rgw_zone"
value: "{{ rgw_zone }}"
with_items: "{{ rgw_instances }}"
when:
- rgw_instances is defined
notify: restart rgw