ceph: improve cluster setup
Remove separate NetBox lookups. Explicitly allow connections between cluster nodes. Tigthen temporary allowed IPv6 ranges.
This commit is contained in:
parent
0af8474e52
commit
ce7903e43a
5 changed files with 48 additions and 15 deletions
15
filter_plugins/netbox.py
Normal file
15
filter_plugins/netbox.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue