Created
February 16, 2012 23:03
-
-
Save zzamboni/1848592 to your computer and use it in GitHub Desktop.
How to define in CFEngine 3 a class as the result of ORing several other classes
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 | |
| { | |
| inputs => { "/var/cfengine/inputs/cfengine_stdlib.cf" }; | |
| bundlesequence => { "test" }; | |
| } | |
| bundle agent test | |
| { | |
| vars: | |
| "pkg" slist => { "one", "two", "three" }; | |
| classes: | |
| "one" expression => "any"; | |
| # a is set to its previous value, ORed with the class indicated by $(pkg), | |
| # looping over all the values in @(pkg). | |
| "a" or => { "a", "$(pkg)" }; | |
| reports: | |
| a:: | |
| "a is set"; | |
| !a:: | |
| "a is not set"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment