Created
July 30, 2012 18:06
-
-
Save rpetre/3208756 to your computer and use it in GitHub Desktop.
this seems to work properly
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 => { "update" }; | |
| } | |
| bundle common g { | |
| vars: | |
| "sandbox_lockfile" string => "/var/cfengine/sandbox"; | |
| has_branch.cf_test:: | |
| "message" string => "I am a test machine"; | |
| has_branch.cf_prod.!cf_test:: | |
| "message" string => "I am a prod machine"; | |
| classes: | |
| "cf_test" expression => fileexists("$(sandbox_lockfile)"); | |
| "cf_prod" expression => "!cf_test"; | |
| "has_branch" expression => "any"; | |
| } | |
| bundle agent update { | |
| files: | |
| cf_prod:: | |
| "$(g.sandbox_lockfile)" | |
| delete => cleanup; | |
| cf_test.!cf_prod:: | |
| "$(g.sandbox_lockfile)" | |
| create => "true"; | |
| reports: | |
| cfengine:: | |
| "$(g.message)"; | |
| } | |
| body delete cleanup { | |
| dirlinks => "tidy"; | |
| rmdirs => "true"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment