Last active
August 29, 2015 14:17
-
-
Save neilhwatson/68291730393b4d3ca698 to your computer and use it in GitHub Desktop.
defaults in cfengine
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 => { "g", "main", }; | |
| } | |
| bundle common g | |
| { | |
| defaults: | |
| "a" string => "default value"; | |
| vars: | |
| "b" string => ifelse( | |
| "set", "set value for 'b'", | |
| "default value for 'b'" | |
| ); | |
| set:: | |
| "a" string => "A 'set' value"; | |
| } | |
| bundle agent main | |
| { | |
| reports: | |
| "a is ${g.a}"; | |
| "b is ${g.b}"; | |
| } | |
| neil@ettin ~/.cfagent/inputs $ cf-agent -Kf ./default.cf | |
| R: a is default value | |
| R: b is default value for 'b' | |
| neil@ettin ~/.cfagent/inputs $ cf-agent -Kf ./default.cf -D set | |
| R: a is A 'set' value | |
| R: b is set value for 'b' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment