Skip to content

Commit

Permalink
Handle adoption when radosgw_address_block is comma delimited list
Browse files Browse the repository at this point in the history
In cephadm-adopt.yml TASK "Update the placement of radosgw hosts"
passes module ceph_orch_apply embedded YAML via a block scalar.
This YAML creates a Ceph spec of service_type RGW. The networks
key of this spec supports either a list or a string. Without this
patch, the networks key of the spec will only contain a string.
With this patch a string is still set for the networks key, but
if Ansible var radosgw_address_block contains commas, then var
radosgw_address_block is split by those commas into a list and
the networks key of the spec will be set to a list.

Closes: https://issues.redhat.com/browse/RHCEPH-10418

Signed-off-by: John Fulton <[email protected]>
(cherry picked from commit b0707ae)
  • Loading branch information
fultonj authored and mergify[bot] committed Feb 6, 2025
1 parent 5cce92a commit 0fab225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infrastructure-playbooks/cephadm-adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@
hosts:
- {{ ansible_facts['nodename'] }}
{% if rgw_subnet is defined %}
networks: "{{ radosgw_address_block }}"
networks: {{ radosgw_address_block.split(',') | list if ',' in radosgw_address_block else radosgw_address_block | string }}
{% endif %}
spec:
rgw_frontend_port: {{ radosgw_frontend_port }}
Expand Down

0 comments on commit 0fab225

Please sign in to comment.