> On 10 Sep 2015, at 15:36, Bertalan Voros <bertalan.vo...@gmail.com> wrote:
>
> Hello All,
>
> If there is a variable defined twice on one object, which value gets used?
> Does it get combined?
>
> Example:
> vars.attribute = "value1"
> vars.attribute = “value2"

‘vars’ is a dictionary in that case using the ‘.’ indexer setting keys to 
specific values. keys must be unique and therefore only the last one is kept.

Try it - validate the configuration and run ‘icinga2 object list’.

>
> There are then two different apply rules using this.
>
> apply1:
> assign where vars.attribute == "value1"
>
> apply2 (somewhere else)
> assign where vars.attribute == "value2"
>
> Can I expect both to take effect?

No.

Kind regards,
Michael

> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users


-- 
Michael Friedrich, DI (FH)
Senior Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | michael.friedr...@netways.de

** OSBConf 2015 - September - osbconf.org **
** OSMC 2015 - November - netways.de/osmc **
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to