diff --git a/roles/ceph-rgw/tasks/multisite/main.yml b/roles/ceph-rgw/tasks/multisite/main.yml index 18a646848..5a5bedb89 100644 --- a/roles/ceph-rgw/tasks/multisite/main.yml +++ b/roles/ceph-rgw/tasks/multisite/main.yml @@ -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