Skip to content

Commit 30df6b8

Browse files
bogdandoopenshift-merge-bot[bot]
authored andcommitted
[ceph] Allow overriding ssh and storage_mgmt
To allow BM SNO with ceph using custom ceph CIDR values, make ssh_network_range and storage_mgmt_network_range overridable via cifmw_ceph_ssh_network_range and cifmw_ceph_storage_mgmt_network_range. Both are set in set_fact which clobbers extra vars, so we use the cifmw_ indirection with default() to preserve original defaults. NOTE: storage_network_range also needs this treatment. It use to be commented out in set_fact, and this change needs extra testing with Ceph ci jobs perhaps. Also gather network facts for IP-to-host mapping. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent 413030f commit 30df6b8

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

hooks/playbooks/ceph.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
gather_facts: false
105105
become: true
106106
tasks:
107+
- name: Gather network facts for IP-to-host mapping
108+
ansible.builtin.setup:
109+
gather_subset:
110+
- network
107111
# jq is normally installed by cifmw_block_device role, but when cifmw_ceph_spec_data_devices
108112
# is defined (indicating block devices are already present), the block device creation play
109113
# is skipped. Install jq explicitly here to ensure it's available for ceph operations.
@@ -200,9 +204,12 @@
200204
when:
201205
- not cifmw_ceph_ipv6 | default(false)
202206
ansible.builtin.set_fact:
203-
ssh_network_range: 192.168.122.0/24
204-
# storage_network_range: 172.18.0.0/24
205-
storage_mgmt_network_range: 172.20.0.0/24
207+
ssh_network_range: >-
208+
{{ cifmw_ceph_ssh_network_range | default('192.168.122.0/24') }}
209+
storage_network_range: >-
210+
{{ cifmw_ceph_storage_network_range | default('172.18.0.0/24') }}
211+
storage_mgmt_network_range: >-
212+
{{ cifmw_ceph_storage_mgmt_network_range | default('172.20.0.0/24') }}
206213
all_addresses: ansible_all_ipv4_addresses
207214
ms_bind_ipv4: true
208215
ms_bind_ipv6: false

0 commit comments

Comments
 (0)