diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index c44edf9ef..27d45e1b5 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -1006,11 +1006,19 @@ environment: CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}' + - name: set_fact rgw_subnet + set_fact: + rgw_subnet: "--networks {{ radosgw_address_block }}" + when: + - radosgw_address_block is defined + - radosgw_address_block != 'subnet' + - name: update the placement of radosgw hosts command: > {{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply rgw {{ ansible_facts['hostname'] }} --placement='count-per-host:{{ radosgw_num_instances }} {{ ansible_facts['nodename'] }}' + {{ rgw_subnet if rgw_subnet is defined else '' }} --port={{ radosgw_frontend_port }} {{ '--ssl' if radosgw_frontend_ssl_certificate else '' }} changed_when: false @@ -1025,6 +1033,7 @@ ceph orch apply rgw {{ ansible_facts['hostname'] }}.{{ item.rgw_realm }}.{{ item.rgw_zone }}.{{ item.radosgw_frontend_port }} --placement={{ ansible_facts['nodename'] }} --realm={{ item.rgw_realm }} --zone={{ item.rgw_zone }} + {{ rgw_subnet if rgw_subnet is defined else '' }} --port={{ item.radosgw_frontend_port }} {{ '--ssl' if radosgw_frontend_ssl_certificate else '' }} changed_when: false