As another test I did the following.

all_hostgroups += { "yumrepo100" = 1 }
all_hostgroups += { "celery-stg101" = 1 }
all_hostgroups += { "discovery101" = 1 }

for (key => value in all_hostgroups) {
log("MMM inside first for statement")
object HostGroup key use(key) {
  display_name = key
  assign where host.vars.range == key
}
} // end for

for (hg in get_objects(HostGroup)) {
   log("MMM inside second for statement: hostgroup: " + hg.name)
}

*****
The result of this is, what gets logged is the first one ("inside
first for statement").
What does not get logged is the second one ("inside second for").

Any thoughts?
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to