> bundle agent test
> {
>  vars:
>  linux::
>   "all_ips"  slist => { "$(sys.ipv4)","$(sys.ipv4)","$(sys.ipv4)" };
>   "mngmt_ip" slist => grep("10.0.50.*","all_ips");
>
>  reports:
>  linux::
>   "--> $(mngmt_ip)";
> }

Thanks for idea, following code works but its an ugly hack =) List of
all ip addresses is very very simple thing, we can them in array so
either ther should be way to build slist using arrays volumes or
intoduce new slist var with all ips in it.

It seems right now we have only one option to have a list of  ip
addresses which is execresult function with ugly shell one-liner in it
=(

But thank you for your help.

 bundle agent test
 {
  vars:
  linux::
   "allips"  slist => {
"$(sys.ipv4[eth0])","$(sys.ipv4[eth1])","$(sys.ipv4[eth2])" };
   "mngmtip" slist => grep("10.0.50.*","allips");

  reports:
  linux::
   "--> $(mngmtip)";
 }
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to