Last active
August 29, 2015 14:26
-
-
Save martingehrke/921210c4a7e42e388f8a to your computer and use it in GitHub Desktop.
A lot of our data is outside our main policy, especially json data. This snippet will help manage dirs that need syncing in a central place. Classes are global
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
#this code has not been tested for minor bugs, but the idea is solid | |
vars: | |
"sync_data" data => parsejson('{ "dir1":"class1", "dir2":"class2" }'); | |
"dirs" slist => getindices("sync_data"); | |
files: | |
"$(dirs)" | |
create => "true", | |
copy_from => secure_cp("/base/$(dirs)", "$(sys.policy_hub)"), | |
if => "$(sync_data[dirs])"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment