ceph: improve cluster setup

Remove separate NetBox lookups. Explicitly allow connections between
cluster nodes. Tigthen temporary allowed IPv6 ranges.
This commit is contained in:
Timotej Lazar 2024-03-01 08:43:15 +01:00
parent 0af8474e52
commit ce7903e43a
5 changed files with 48 additions and 15 deletions

15
filter_plugins/netbox.py Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/python
class FilterModule(object):
'''Various utilities for manipulating NetBox data'''
def filters(self):
return {
'device_address': self.device_address
}
def device_address(self, device):
'''Return loopback IP addresses for an L3 attached device'''
for iface in device['interfaces']:
for addr in iface['ip_addresses']:
if addr.get('role') and addr['role'].get('value') == 'loopback':
yield addr