Created
April 23, 2012 18:28
-
-
Save jlgreer/2472899 to your computer and use it in GitHub Desktop.
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
# Testing version - not yet part of library | |
bundle agent template_std_flipclass(file, prefix, fileserver, mode, owner, group, class) { | |
files: | |
"$(file).template" | |
copy_from => copy_std("$(prefix)$(file).template", | |
"$(fileserver)", "false", "timestamp"), | |
perms => mode_owner_group("$(mode)", "$(owner)", "$(group)"), | |
action => actionsettings_fix_inform("inform"); | |
"$(file)" | |
perms => mode_owner_group("$(mode)", "$(owner)", "$(group)"), | |
create => "true", | |
edit_line => expand_variables("$(file).template"), | |
# Using the full-featured body here because we need to empty the file | |
# client-side first. | |
classes => if_repaired("$(class)"), | |
edit_defaults => editsettings("timestamp", "true", "50K"), | |
action => actionsettings_fix_inform("inform"); | |
} |
derp. this seems to work. tested on a non-erroring bundle. ;)
rdj:dcsunix silkey$ svn di ../../inputs/common/library.cf
Index: ../../inputs/common/library.cf
===================================================================
--- ../../inputs/common/library.cf (revision 51)
+++ ../../inputs/common/library.cf (working copy)
@@ -849,7 +849,28 @@
action => actionsettings_fix_inform("inform");
}
+# Testing version - not yet part of library
+bundle agent template_std_flipclass(file, prefix, fileserver, mode, owner, group, class) {
+files:
+
+ "$(file).template"
+ copy_from => copy_std("$(prefix)$(file).template",
+ "$(fileserver)", "false", "timestamp"),
+ perms => mode_owner_group("$(mode)", "$(owner)", "$(group)"),
+ action => actionsettings_fix_inform("inform");
+
+ "$(file)"
+ perms => mode_owner_group("$(mode)", "$(owner)", "$(group)"),
+ create => "true",
+ edit_line => expand_variables("$(file).template"),
+ # Using the full-featured body here because we need to empty the file
+ # client-side first.
+ classes => if_repaired("$(class)"),
+ edit_defaults => editsettings("timestamp", "true", "50K"),
+ action => actionsettings_fix_inform("inform");
+
+}
################################################################################
#
# Package management bodies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fwict, this doesnt work:
varnish.cf
library.cf:
cf-agent run: