Open joachimBurket opened 2 months ago
Hi,
do these devices belong to a cluster? Or are they stand alone ESXi hosts? Please have a look at the cluster_site_relation
setting.
Hi!
They do belong to clusters, but these clusters have their Site to <NONE>
, because our Clusters aren't specific to a Site
We therefore used the host_site_relation
to place the Hosts depdending on their name, which works for most of our devices. But we still have some devices that aren't named conventionally and are placed in the default site.
A workaround could be to add those Devices in the host_site_relation
, but it is not very practical, as we would need to update the settings.yaml
for any new unconventional Device.
An interesting feature for us would be to be able to set a default value for the different relations in the settings file (for instance the host_site_relation
), and then being able to configure the sync so that it doesn't override the values in NetBox that were changed from the default one to another value. Would it make sense to you?
This sounds like to be solvable with some bash, yq and curl glue.
Quick idea:
This way you can automate this process. Or you can set the config option via an environment variable.
I have some Hosts in the vCenter for which the site can't be inferred from the name, and therefore are set to the default site (
vCenter: <vcenter-name>
) by the sync. I then manually put the Devices in the right Site and Rack. But then on the next run of the sync script, those Devices generates errors because the sync tries to override the Site to the default. Example of error:Is there a way to bypass the override of the Site when the device already has a Site in NetBox that is not the default one?