diff --git a/cdist/conf/type/__consul_template_template/man.rst b/cdist/conf/type/__consul_template_template/man.rst index 20d0a619..6264f696 100644 --- a/cdist/conf/type/__consul_template_template/man.rst +++ b/cdist/conf/type/__consul_template_template/man.rst @@ -36,6 +36,14 @@ source-file state if this template is 'present' or 'absent'. Defaults to 'present'. +wait + The `minimum(:maximum)` time to wait before rendering a new template to + disk and triggering a command, separated by a colon (`:`). If the optional + maximum value is omitted, it is assumed to be 4x the required minimum value. + This is a numeric time with a unit suffix ("5s"). There is no default value. + The wait value for a template takes precedence over any globally-configured + wait. + EXAMPLES -------- @@ -51,6 +59,7 @@ EXAMPLES # upload a local file to the target and configure it __consul_template_template nginx \ + --wait '2s:6s' \ --source-file "$__manifest/files/nginx.ctmpl" \ --destination /etc/nginx/nginx.conf \ --command 'service nginx restart' @@ -65,5 +74,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is +Copyright \(C) 2015-2016 Steven Armstrong. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__consul_template_template/manifest b/cdist/conf/type/__consul_template_template/manifest index c997a2c8..b832075d 100755 --- a/cdist/conf/type/__consul_template_template/manifest +++ b/cdist/conf/type/__consul_template_template/manifest @@ -55,7 +55,7 @@ for param in $(ls "$__object/parameter/"); do printf ' source = "%s"\n' "$destination" ;; - source|destination|command) + source|destination|command|wait) printf ' %s = "%s"\n' "$param" "$(cat "$__object/parameter/$param")" ;; *) diff --git a/cdist/conf/type/__consul_template_template/parameter/optional b/cdist/conf/type/__consul_template_template/parameter/optional index 229f6c89..3e55fbb7 100644 --- a/cdist/conf/type/__consul_template_template/parameter/optional +++ b/cdist/conf/type/__consul_template_template/parameter/optional @@ -2,3 +2,4 @@ command source source-file state +wait