Having an issue with iprange not working in v3.  Stripped out everything and 
reduced it to this code snippet (below), still not working. What gives?

# cat test.cf
body common control {
  bundlesequence  => { "test_routes" };
}
bundle agent test_routes {
  classes:
    "Has_Net1" expression => iprange("10.125.7.0/25");
    "Has_Net2" expression => iprange("10.126.19.128/25");

  commands:
    Has_Net1::
      "/bin/echo Has_Net1 is true";
    !Has_Net1::
      "/bin/echo Has_Net1 is false";
    Has_Net2::
      "/bin/echo Has_Net2 is true";
    !Has_Net2::
      "/bin/echo Has_Net2 is false";
}

# ifconfig -a | grep inet | grep broadcast
        inet 10.126.19.172 netmask ffffff80 broadcast 10.126.19.255
        inet 10.125.7.98 netmask ffffff80 broadcast 10.125.7.127

And I get this during cf-agent run

# cf-agent -nf test.cf
-> Would execute script /bin/echo Has_Net1 is false
-> Would execute script /bin/echo Has_Net2 is true

Both should be true.  

- Jim
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to