Last active
August 29, 2015 13:57
-
-
Save neilhwatson/9762620 to your computer and use it in GitHub Desktop.
Defaults from other bundles.
This file contains 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 => | |
{ "main", }; | |
} | |
bundle agent g | |
{ | |
vars: | |
foo:: | |
"masterfiles" string => "${sys.workdir}/repos/custom/masterfiles"; | |
} | |
bundle agent c | |
{ | |
defaults: | |
"masterfiles" | |
if_match_regex => "\$\{g\.masterfiles\}", | |
string => "${sys.workdir}/masterfiles"; | |
vars: | |
"masterfiles" string => "${g.masterfiles}"; | |
} | |
bundle agent main | |
{ | |
meta: | |
"purpose" string => "Test defaults"; | |
methods: | |
"vars" usebundle => g; | |
"config" usebundle => c; | |
"go" usebundle => test; | |
} | |
bundle agent test | |
{ | |
reports: | |
"masterfiles => ${c.masterfiles}"; | |
} | |
$ cf-agent -Kf ./defaults.cf | |
2014-03-25T10:08:47-0400 notice: R: masterfiles => /home/newatson/.cfagent/masterfiles | |
$ cf-agent -Kf ./defaults.cf -D foo | |
2014-03-25T10:08:50-0400 notice: R: masterfiles => /home/newatson/.cfagent/repos/custom/masterfiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment