Skip to content

Commit 4587a45

Browse files
committed
[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 874a574 commit 4587a45

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.
@@ -186,9 +190,12 @@
186190
when:
187191
- not cifmw_ceph_ipv6 | default(false)
188192
ansible.builtin.set_fact:
189-
ssh_network_range: 192.168.122.0/24
190-
# storage_network_range: 172.18.0.0/24
191-
storage_mgmt_network_range: 172.20.0.0/24
193+
ssh_network_range: >-
194+
{{ cifmw_ceph_ssh_network_range | default('192.168.122.0/24') }}
195+
storage_network_range: >-
196+
{{ cifmw_ceph_storage_network_range | default('172.18.0.0/24') }}
197+
storage_mgmt_network_range: >-
198+
{{ cifmw_ceph_storage_mgmt_network_range | default('172.20.0.0/24') }}
192199
all_addresses: ansible_all_ipv4_addresses
193200
ms_bind_ipv4: true
194201
ms_bind_ipv6: false

0 commit comments

Comments
 (0)