Change imported "host.vars" via director?

Hey,

I imported some hosts with the module “fileshipper”. All hosts got some variables from the import. Like “location”, “additional info”…

In the director tab “preview” from a imported host it looks like this:

Konfigurationsvorschau: sw-xx-xx-xx
Aufgelöst anzeigen
zones.d/satellite-x-x-x/hosts.conf

object Host "sw-x-x-x-x" {
    import "x-Switche"

    display_name = "sw-x-x-x-x-"
    address = "1.1.1.1"
    icon_image = "switch.png"
    vars.Beschreibung = "xyz"
    vars.Location = "a b c"
    vars["MAC-Adresse"] = "1234"
    vars.Modell = "bli bla blub"
    vars["Serial Number"] = "ABCZZZZ "

Here I can see all variables. Also in the normal view from dashboard I can see this things.

Buuuuuut: Can I edit this variables somewhere? Then I now configure a host in the director I can set the normal things like IP, Hostname, Display Name, Agent Zone… but have not the option to edit the variables that are shown in the “preview” tab.

Best regards,
Philipp

Okay, got it by my own.

Just define a datafield with the same name of the imported variable-name in the director and put it on the host.group. Now the field with the value of the vars is visisble and is filled in the “host” tab from the director and also editable.

1 Like