Top answer :)
> set_if = {{ return macro("$valtest$") == "foo }}
Should read
> set_if = {{ return macro("$valtest$") == “foo" }}
Kind regards,
Michael
> On 26 Nov 2016, at 22:04, Thomas Gelf <[email protected]> wrote:
>
> Hi Dirk!
>
> Am 26.11.2016 um 21:54 schrieb Dirk Roeder:
>> command = [ PluginDir + "/debug" + "-v"]
>
> I guess this is what you're looking for:
>
> command = [ PluginDir + "/debug", "-v"]
>
>
>> * How can I append empty arguments based on a variable content? So I
>> could use 2 different variables, but for this checks it is one of two
>> possible values, so I would like to use only one.
>
> I didn't try it, but this should work:
>
> arguments = {
> "-foo" = {
> set_if = {{ return macro("$valtest$") == "foo }}
> }
> "-bar" = {
> set_if = {{ return macro("$valtest$") == "foo }}
> }
> }
>
> The main reason why your tests didn't work as expected is that the code
> in set_if is executed in a completely different context later on.
>
> Cheers,
> Thomas
>
> --
> Thomas Gelf
> Principal Consultant
>
> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> http://www.netways.de | [email protected]
>
> ** OSMC 2016 - November - netways.de/osmc **
> ** OSDC 2017 - Mai – osdc.de **
> _______________________________________________
> icinga-users mailing list
> [email protected]
> 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
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]
** OSMC 2016 - November - netways.de/osmc **
** OSDC 2017 - Mai – osdc.de **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users