Last active
December 31, 2015 03:29
-
-
Save teroka/7928277 to your computer and use it in GitHub Desktop.
regarray() bug?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body common control { bundlesequence => { "example1", "example2" }; } | |
bundle agent example1 | |
{ | |
vars: | |
"myarray[0]" string => "bla1"; | |
"myarray[1]" string => "bla2"; | |
"myarray[3]" string => "bla"; | |
classes: | |
"ok" expression => regarray("myarray","b.*2"); | |
reports: | |
ok:: | |
"$(this.bundle): Found in list"; | |
!ok:: | |
"$(this.bundle): Not found in list"; | |
} | |
bundle agent example2 | |
{ | |
vars: | |
"myarray[0]" string => "bla1"; | |
"myarray[1]" string => "bla2"; | |
"myarray[3]" string => "bla"; | |
classes: | |
"ok" expression => regarray("$(this.bundle).myarray","b.*2"); | |
reports: | |
ok:: | |
"$(this.bundle): Found in list"; | |
!ok:: | |
"$(this.bundle): Not found in list"; | |
} | |
#### | |
$ cf-agent -Kf ./regarray_bug.cf | |
2013-12-12T15:53:24+0200 notice: R: example1: Not found in list | |
2013-12-12T15:53:24+0200 notice: R: example2: Found in list | |
$ cf-agent -V | |
CFEngine Core 3.5.2 | |
$ ./cf-agent -Kf /tmp/regarray_bug.cf | |
2013-12-12T16:34:11+0200 notice: R: example1: Not found in list | |
2013-12-12T16:34:11+0200 notice: R: example2: Found in list | |
$ ./cf-agent -V | |
CFEngine Core 3.5.3 | |
$ ./cf-agent -f /tmp/regarray_bug.cf | |
2013-12-12T16:37:44+0200 notice: /example1: R: example1: Found in list | |
2013-12-12T16:37:44+0200 notice: /example2: R: example2: Found in list | |
$ ./cf-agent -V | |
CFEngine Core 3.6.0a1.bc38eab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment